I have both Java JRE and Java JDK on a FreeBSD 7.2 box (running PFSense) from http://www.freebsdfoundation.org/downloads/java.shtml
find / -name gives me output like:
/usr/local/diablo-jre1.6.0/bin/java
/usr/local/diablo-jdk1.6.0/bin/java
/usr/local/diablo-jdk1.6.0/jre/bin/java
so I make a link to /usr/local/bin like so:
ln /usr/local/diablo-jre1.6.0/bin/java /usr/local/bin/java
and now I get
# rehash
# java
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
SOOOOOO, I'm wondering if there is some tool I can use to turn on a particular java vm similar to Ubuntus' /etc/jvm?
The /usr/local/diablo-jre1.6.0/bin/java
application probably locates libjava.so
relative to the location of the java
application itself. By creating a hard link to java
and executing it via that hard link, you've probably broken that mechanism.
Suggestions:
/usr/local/diablo-jre1.6.0/bin
on your search path.java
instead of a link.ln -s
to create it.