options for compiling large jars

Andrew Haley aph@redhat.com
Sat Dec 16 18:32:00 GMT 2006


Per Bothner writes:
 > Tom Tromey wrote:
 > > I think the script we use also omits non-.class files when compiling.
 > > If you're deploying using the class map .db then you need the jars
 > > around anyhow, and resources compiled into a .so will just waste space
 > > and not be used.
 > 
 > That brings me to my next question: Kawa has a gckawa script (not
 > installed by the Fedora rpm). This script enables someone to
 > aot-compile classes compiled by Kawa (from Scheme/XQuery sources)
 > to native code. I'm trying to figure out to write such a script
 > so that it uses the installed .jar and .so files, both at
 > compile/link-time and run-time.
 > 
 > More generally, is there a supported procedure to gcj-compile a
 > Java application, using installed libraries?
The aot-compile script should do exactly what you want: it compiles
all the jar files in a directory and builds the corresponding
databases. 
If these are for system-wide use, you can install them in
/usr/libX/gcj. Then, rebuild-gcj-db finds everything in
/usr/libX/gcj:
/usr/lib64/gcj/xalan-j2/xalan-j2-2.6.0.jar.so
/usr/lib64/gcj/xalan-j2/xalan-j2-2.6.0.jar.db
/usr/lib64/gcj/jessie/jsse-1.0.1.jar.db
/usr/lib64/gcj/jessie/jsse-1.0.1.jar.so
/usr/lib64/gcj/java-1.4.2-gcj-compat/bcprov-1.31.jar.db
/usr/lib64/gcj/java-1.4.2-gcj-compat/bcprov-1.31.jar.so
 ... etc
and creates /usr/libX/gcj-version/classmap.db, which is used at
runtime.
What we don't have at the present time is a version of rebuild-gcj-db
that can be used locally by one user: it's hard-wired to
/usr/libX/gcj-version/classmap.db. Such a thing wouldn't be hard to
write, and it would be very nice to have.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /