Valhalla Legends Forums Archive | Java Programming | good java decompiler and compiler

AuthorMessageTime
Tontow
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).
November 9, 2004, 12:20 AM
St0rm.iD
compiler: jikes
decompiler: jad
November 9, 2004, 1:26 AM
Tontow
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.
November 9, 2004, 8:11 PM
St0rm.iD
From what I know, jad is _the_ java decompiler.

Also, the code is likely obfuscated.
November 9, 2004, 8:34 PM
Tontow
[quote author=Banana fanna fo fanna link=topic=9478.msg88089#msg88089 date=1100032449]
Also, the code is likely obfuscated.
[/quote]
Is there any way around that? (aside from rewriting the code after it is decompiled)
November 9, 2004, 10:09 PM
TangoFour
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
November 9, 2004, 11:55 PM
Tontow
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.
November 10, 2004, 8:03 PM
St0rm.iD
[quote author=Tontow link=topic=9478.msg88244#msg88244 date=1100117022]
I can get it back to the original code
[/quote]

You can't.
November 11, 2004, 2:55 AM
Myndfyr
[quote author=Tontow link=topic=9478.msg88244#msg88244 date=1100117022]
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]

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.
November 11, 2004, 10:52 AM
TangoFour
[quote author=Banana fanna fo fanna link=topic=9478.msg88335#msg88335 date=1100141709]
[quote author=Tontow link=topic=9478.msg88244#msg88244 date=1100117022]
I can get it back to the original code
[/quote]

You can't.
[/quote]

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
November 11, 2004, 3:53 PM
iago
IDA can disassemble .class files.  I've never tried, so I have no clue how it is.
November 14, 2004, 8:13 PM
Tontow
Is there any way to monitor wich .class files are active or being accessed while the program is running?
November 15, 2004, 6:11 PM
iago
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 :)
November 15, 2004, 6:42 PM
Myndfyr
[quote author=iago link=topic=9478.msg88851#msg88851 date=1100463204]
IDA can disassemble .class files.  I've never tried, so I have no clue how it is.
[/quote]

Chances are that it displays bytecode, not Javacode.  :P
November 16, 2004, 12:26 AM
St0rm.iD
you can do a debug dump of all loaded classes.
November 16, 2004, 1:20 AM

Search