bc-abi2: large application handling
Andrew Haley
aph@redhat.com
Mon Oct 11 15:29:00 GMT 2004
Jakob Praher writes:
> hi,
>
> since I am playing with the new abi a bit, I was wondering, how to deal
> with big applications.
>
> Which use cases do you have for compiling big applications to gcj using
> the new abi?
>
> * is the chaching stuff (at installation time) already functional?
No.
> - how can it be triggered?
>
> * what are shared object files / what are executables?
I don't understand this question.
> in java every class can be mainable, so how do you go for that when
> compiling so files - is the --main argument still the right method
> should.
Shared objects don't have a --main. You can invoke them with gij,
which you give a class name whose main you wish to invoke.
> How about a generic app stub that is able to load a shared object
> and call that static main. (so every class file resides inside a
> so)
gij does that.
> * what is the way to use large interdependent jar files in compiling:
>
> for instance, given
> - app.jar
> - lib1.jar
> - lib2.jar
>
> app defining a mainable class as myapp.Main, which depends on lib1.jar
> and lib2.jar, whats the best way to turn that into gcj form?
>
> when using the idiom
>
> gcj -findirect-dispatch -classpath app.jar:lib1.jar:lib2.jar
> --main=myapp.Main -o app
gcj -findirect-dispatch -classpath app.jar:lib1.jar:lib2.jar -shared -o app.so
> with bigger classes, I get an internal compiler error. Is the usage
> simply wrong, or is that a bug in the compiler?
That would be a bug. An ICE is always a bug.
> * is it better to compile the jar files separatly to so files and to
> link them to app? - if so how is that expressed with gcj
I think so, but not everyone agrees.
Andrew.
More information about the Java
mailing list