• Welcome to Valhalla Legends Archive.
 

good java decompiler and compiler

Started by Tontow, November 08, 2004, 06:20 PM

Previous topic - Next topic

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).

Banana fanna fo fanna


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.

Banana fanna fo fanna

From what I know, jad is _the_ java decompiler.

Also, the code is likely obfuscated.

Tontow

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)

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

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.

Banana fanna fo fanna


MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

TangoFour

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

iago

IDA can disassemble .class files.  I've never tried, so I have no clue how it is.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Tontow

Is there any way to monitor wich .class files are active or being accessed while the program is running?

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 :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


MyndFyre

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
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Banana fanna fo fanna

you can do a debug dump of all loaded classes.