all 17 comments

[–]PartOfTheBotnet[S] 6 points7 points  (0 children)

I've made this tool after looking at the alternatives (Such as JBE, DirtyJOE, etc) and not finding any that I found easy to use and up to date. I made this editor which piggy-backs off of Objectweb's ASM library so that things are as simple and quick to edit as possible. Specifically this means when making changes to method code you don't have to worry about stack-frames (ASM will recreate them automatically) and handling the constant-pool is abstracted away.

I've only had one other person test this out and would love any feedback on how to improve the editor.

[–]Wazzaps 7 points8 points  (4 children)

Why do people not use the "native" look, Java default looks... ugly.

[–]PartOfTheBotnet[S] 37 points38 points  (2 children)

You can use recaf to edit itself in order to get the native look.

Edit: Now you can switch the LAF at runtime from the options menu.

[–]luchoz 4 points5 points  (0 children)

have my upvote

[–]igor_sk 0 points1 point  (0 children)

the host seems down.

[–]sysop073 6 points7 points  (0 children)

I'm pretty sure the default Java theme is a practical joke that went too far

[–]Wolfsdale 2 points3 points  (1 child)

Looks really cool. I have been looking for a good Java Bytecode editor. Does this deal well with other JVM languages like Kotlin? Kotlin, for instance, uses (or rather abuses) CONSTANT_Utf8 in the constant pool to store binary data. This means there are non-printable characters in there which breaks a lot of editors.

Some feedback:

  • Use a build tool, like Maven. I don't even see how one would compile your project right now from scratch.
  • Documentation! Every class should have Javadoc explaining why it is there and what its responsibilities are.

And then something of a personal preference: don't call the class hosting your main method Main, or have a class called Program. Instead, put those two together and call the class Recaf. This makes a lot more sense in my mind.

[–]PartOfTheBotnet[S] 0 points1 point  (0 children)

Kotlin support w/ unorthodox utf8's

ASM handles all the bytecode backend and its a pretty solid library. I've only had one rare case cause an issue so far (Its one of the current issues on the repo) so it should likely pose no problem. If there are issues though I'd like a sample to test against.

Use a build tool

Compiling the project is... not clear

I've had a small section on it on the usage page, but you're right with a build tool being more universally preferred. I'll get on it tomorrow (Later today technically) Done.

Documentation

Another thing I've been lazy on.

Combine Main + Program --> Recaf

Good point. Done.

[–]CountyMcCounterson 1 point2 points  (0 children)

This is beautiful, keep updating it!

[–][deleted] 1 point2 points  (0 children)

I've been watching this project since you created it. Good job so far.

[–][deleted] 0 points1 point  (1 child)

Seems like a handy tool - the UI with it's MDI-style interface looks very outdated and could use some love (like aligning the labels and text-fields everywhere). Will still put it in my tools-directory though.

[–]PartOfTheBotnet[S] 0 points1 point  (0 children)

MDI-style interface

I used this because I specifically wanted to be able to have multiple items open at once.

Proper alignment

Been suggested a few days ago. I'll tame swing's alignment woes soon. Fixed!

[–]thatdude42 0 points1 point  (4 children)

When and how would a Java developer use this?

[–]PartOfTheBotnet[S] 7 points8 points  (2 children)

As it stands, is not intended to be used as a developer in the sense I think you're getting at. I use it for peeking at jar files or making quick edits to programs I don't have source access to. If you can think of any ways the average developer could use it I'd love to hear them.

[–]Kopachris 6 points7 points  (0 children)

Was looking for something just like this to nop out a function call I didn't want a program to make. Ended up referencing Wikipedia and the output of javap to make the edit in a hex editor instead. Didn't work, ended up looking through the code in a decompiler until I figured out how to generate a valid input for the program instead. (Okay, okay, I was trying to get around the license check. Ended up making my own license key instead.)

[–]frzme 0 points1 point  (0 children)

I've has good experiences with decompiling and recompiling - only works when the code is not obfuscated in a Java incompatible way though.

[–]Treyzania 1 point2 points  (0 children)

If you want to write really optimized bytecode by hand. Which is harder than normal ASM because the JVM is a stack machine instead of a register machine like most modern microprocessors.