[fedora-java] java.home/java.library.path etc, what can I rely on ?
Caolan McNamara
caolanm at redhat.com
Thu Aug 23 17:25:44 UTC 2007
So, for..
class findhome
{
public static void main(String args[])
{
System.out.println(System.getProperty("java.home"));
System.out.println(System.getProperty("gnu.classpath.home.url"));
System.out.println(System.getProperty("java.library.path"));
}
}
javac findhome.java
java findhome
I have (on x86_64) ...
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
file:///usr/lib64
/usr/lib64/gcj-4.1.2
For something like OOo we have two sort of requirements,
at run time we'd like to dlopen libjvm.so, currently the approach I took for gcj
was to stick lib/ARCH/client/libjvm.so onto the value of java.home. I guess from the
output here searching through java.library.path is also plausible ?
The other requirement is at buildtime to link against libjawt.so and to find the
java headers.
but for e.g. suse right now apparently the output of the above (for i386) is..
/usr
file:///usr/lib/gcc/i586-suse-linux/4.2.1
/usr/lib/gcj-4.2.1
So what I'm wondering is if there is a canonical reference to what the various
properties should refer to. i.e. are my assumptions just busted, or is e.g. the
suse gcj misconfigured and if there is more correct way to find libjvm.so. And
while I'm at it is there a good solid cross platform and cross java-impl test
to find the correct include and link path to build against the java headers and
link to libjawt and friends.
C.
More information about the fedora-devel-java-list
mailing list