Results 1 to 2 of 2
Hello: I have a new CentOS 6.3 installation. I'm a little confused about environment variables. I installed the Java 7 SDK in /usr/java/jdk7 I placed a file called java.sh in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-16-2012 #1
- Join Date
- Dec 2012
Help with "which" and environment variables please
I have a new CentOS 6.3 installation. I'm a little confused about environment variables.
I installed the Java 7 SDK in /usr/java/jdk7
I placed a file called java.sh in /etc/profile.d... the contents of which are:
When I typed java -version from the command line, I got this:
OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-188.8.131.52.5.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Which is WRONG. So I did which java and got this:
But if I do set | grep PATH
I see the /usr/bin is in the path and I'm guessing that's how the OpenJDK gets seen instead of my install of the JDK.
The problem is, I obviously want "which java" to reflect my install and not the one in /usr/bin/java
Any assitance you can provide is greatly appreciated. Thanks!
- 12-16-2012 #2
- Join Date
- Nov 2008
I am not an linux expert but you can check your system environment as use command env as there are few Java related veriables
try to change them to java you want to use.
I think it removing OpenJDK is a valid scenario.
I hope this helps.