Java Bytecode Editor

Hey

I had to patch a class file today and I spent several hours to find a working tool. reJ threw a NullPointerException when I tried to insert the instruction “ifne”, it seems to be unfinished, it’s a shame as it could be a very nice editor, it already has numerous nice features, an hex viewer, … The famous Java Decompiler works but it’s not an editor. I didn’t succeed in editing with ClassEditor.

After that, I tried JByteMod and it worked. It’s a very complete editor, it uses several decompilers (3 including Procyon the last time I gave it a try). It allows to edit everything in class files, the colored syntax drives the code more pleasant to read, it supports Java 1.8, it shows a control flow graph which helps to understand what you’re doing especially when you’re not a bytecode expert.

Best regards.

Looks like it’d be useful for analyzing obfuscated code (love the flow graph), though I’m still left doing the heavy lifting of building the actual transformations by hand.
Also, no Eclipse plugin? :-\

I’d love a tool to automate the complete workflow; e.g.

  • browse and edit the obfuscated code.
  • tool analyses your changes, and builds code to perform those transformations programmatically.

Though for instrumenting obfuscated code you’d want the code injection points to key off certain other prominent bytecode features, which would be highly dependent upon context; rather hard to fully automate such a feature.

What I’m imagining would be similar to the code creation engines behind GUI builders, but generating bytecode transformations instead of UIs.

I guess no tools like these exist?
The closest I’ve seen is ASM’s ASMifier (generates ASM code that’ll programmatically recreate a visited class.), though that’s a loooong way from what I’m wanting.

An Eclipse plugin would be useful but its absence doesn’t drive this editor useless especially when I see that I’ve found no other tool to do this job. Okay, maybe I’ve forgotten to talk about some not polished editors that require Python and without any binary build and I haven’t tested JBE as I fear it supports only Java 1.5.

If it’s up to be, why not contributing? You could make a request for enhancement and implement this feature, couldn’t you?

I’d love to contribute… but I don’t have the time to work on my own projects, let alone other people’s :’(