Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCJ bytecode -> native code compilation problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
osgood
n00b
n00b


Joined: 24 Aug 2004
Posts: 30

PostPosted: Thu Sep 30, 2004 12:06 am    Post subject: GCJ bytecode -> native code compilation problems Reply with quote

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
View user's profile Send private message
FallenAngel
n00b
n00b


Joined: 29 Sep 2004
Posts: 51

PostPosted: Fri Oct 01, 2004 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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