View previous topic :: View next topic |
Author |
Message |
osgood n00b
Joined: 24 Aug 2004 Posts: 30
|
Posted: Thu Sep 30, 2004 12:06 am Post subject: GCJ bytecode -> native code compilation problems |
|
|
Hello,
I'm trying to compile a Java bytecode to the native code. I have gcj working and I'm able to compile Java source code to the native code and run it without problems. However, when I take a detour and compile the Java source code to Java bytecode with Sun's javac and then compile this bytecode to the native code I'm getting these errors
Main.java: In class `Main':
Main.java: In method `Main.test(int)':
Main.java:47: error: cannot find file for class java.lang.StringBuilder
Main.java:57: error: class 'java.lang.StringBuilder' has no method named '<init>' matching signature '()
...
and many others. Now, I've studied the documentation and resources on the internet but I wasn't succesfull so far.
I tried to supply Sun's jre/rt.jar in the classpath but it didn't help.
Has anybody met and solved this problem?
Thank you,
David
FYI: I plan to compile Java bytecode for which I don't have the source code available, that's the reason why I'm taking the detour in my experiments... |
|
Back to top |
|
|
FallenAngel n00b
Joined: 29 Sep 2004 Posts: 51
|
Posted: Fri Oct 01, 2004 4:34 pm Post subject: |
|
|
There are some pretty good Java decompilers around, which can recreate the source from bytecode. So you could use these decompiled source files for your native compilation. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|