This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiling to native: simple q


Nic Ferrier wrote:

>I'm getting a whole bunch of errors that are to do with the
>dependancies of the class files.
>
>I have the CLASSPATH variable set to the jar files that are the
>dependancies for the paperclips classes, do I need to include them as
>compilation targets? (when I do that gcj segfaults).
>
>Should I be unpacking the jar files as classes and having gcj compile
>the whole thing?
>
>Should I be converting all the jar files into native libs and solving
>the depends that way?
>

Yes. You can't have native code that depends on bytecode (except for 
weak dependencies, ie reflection)

You could compile the .jar files into shared libraries:

gcj -shared foo.jar -o libfoo.so

And then link your application against them:

gcj my/classes/*.java --main=my.classes.main -o myapp libfoo.so

regards

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]