Quote:
Originally Posted by ocicat
I don't run 1.7, but creating symlinks in 1.6 has worked for me:
Code:
# ln -sf /usr/local/jdk-1.6.0/bin/java /usr/local/bin/java
# ln -sf /usr/local/jdk-1.6.0/bin/javac /usr/local/bin/javac
|
No dice. 1.5 and 1.6 behave nicely: when I have it in my PATH, it works fine. Also, this works regardless of PATH:
Code:
$ cd /usr/local/jdk-1.7.0/bin
$ ./java
[reams of output]
$ cd .. ; bin/java
[same]
$ cd .. ; jdk-1.7.0/bin/java
[same]
So, it seems like Java is finding the libraries by using getcwd() and argv[0]. This is clearly a horrible idea since it makes working with PATH impossible. I don't know how java 1.5 and 1.6 found the libraries, but it was definitely a different method.
The only solution besides changing the source code is messing with the linker. Currently, ldconfig does not see any of the libraries in /usr/local/jdk-1.7.0/jre/lib/i386 and I can't figure out why.
I also tried setting JAVA_HOME and JDK_HOME to /usr/local/jdk-1.7.0.