This content has been marked as final. Show 19 replies
Nitin Khare wrote:I think it is more likely that instead of using
a) PATHYou can see that "No such file or directory" in your path which means you have something wrong for PATH in your ./bash_profile
-bash: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory
that he just used
This of course will try to execute the content of the PATH environment variable and not list it and gives the "No such file or directory" error he reports.
To my mind the OP has two possible actions. He can remove the offending Java 6 using the package manager or he can modify the PATH environment variable so that the Java 7 bin directory is ahead of the other bin directories. The first option would be my preferred one.
Basically, you forgot to link your javac in /usr/bin/javac to the javac in your JDK 1.7 bin directory properly. On the server where it is working, this has been done, whereas on the server where it is not working, /usr/bin/javac is linked to the javac in the JDK 1.6 bin directory.
935486 wrote:From the steps you have done, you did not perform an alternatives for javac, only for java and javaws
rpm -Uvh /usr/local/jdk-7u3-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
alternatives --config java
So javac got linked somehow, but inconsistently.
935486 wrote:Well, there are quite a few things you need to link if you want every JDK tool to work from the /usr/bin directory, but for compiling only, linking javac is sufficient. You may want to link javadoc and jar as well, but there are quite a lot of other utilities which is way to cumbersome to link them all. It is better just to add your JDK's bin directory to your PATH.
Anything else I must be linking on the linux platform? Thank you.