I'm looking for a good java compiler and a good decompiler. I'm not sure if class files are readable after there compiled; for that matter I'm not sure if java compiles at all.
The reason I'm asking is because I found this old game called RoboForge (www.roboforge.net) that is no longer being developed and I would like to make some independent improvements on it. -(Once I finish learning java)
The game is basically dead except for one or two small groups that still play; it seems the only way to get the full version is through someone that already has it (the game is no longer being sold anywhere).
compiler: jikes
decompiler: jad
Are there any other good decompilers? It seems jad dosent handle loops very well... I would like to decompile itt back to the original source code if at all possable.
From what I know, jad is _the_ java decompiler.
Also, the code is likely obfuscated.
Quote from: Banana fanna fo fanna on November 09, 2004, 02:34 PM
Also, the code is likely obfuscated.
Is there any way around that? (aside from rewriting the code after it is decompiled)
No, not really any way around obfuscation
As for compiler, you could just use javac, the standard SUN java compiler
As for decompiler, I've used Dejava a few times - it does the job, but isn't that stunning
I don't cair if it is stunning so long as I can get it back to the original code and be able to just reinsert it back in with the other class files and have the changes I make work.
Quote from: Tontow on November 10, 2004, 02:03 PM
I don't cair if it is stunning so long as I can get it back to the original code and be able to just reinsert it back in with the other class files and have the changes I make work.
My experience with .NET decompilation is that, once you go beyond, say, one level of if/else statements, decompilers begin to get nutty. Code optimizations will put gotos and things through code paths, and make nested ifs look haywire, not to mention nested select cases. Chances are that if the code is complicated at all, a decompiler is not going to help you very much.
Quote from: Banana fanna fo fanna on November 10, 2004, 08:55 PM
Quote from: Tontow on November 10, 2004, 02:03 PM
I can get it back to the original code
You can't.
Indeed not, many of the original source file will be lost during compilation - all comment in any case, and variable names might get shifted around as well - at best you'll get an approximation of the original code
IDA can disassemble .class files. I've never tried, so I have no clue how it is.
Is there any way to monitor wich .class files are active or being accessed while the program is running?
Well, you know the main one, I hope. It's the one that comes after "java". From there, you can probably find references to the ones it uses, etc. Generally, they'll all be used at some point or other, unless the programmers suck :)
Quote from: iago on November 14, 2004, 02:13 PM
IDA can disassemble .class files. I've never tried, so I have no clue how it is.
Chances are that it displays bytecode, not Javacode. :P
you can do a debug dump of all loaded classes.