Saturday, March 20, 2010

Sobriety Congratulations Card

assigning the variable JAVA_HOME to path in CENTOS

If you've installed Centos and put options to install java as a development platform should be tested if you had with

# java-version

should throw you something like:
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK
64-Bit Server VM (build 1.6.0-b-09 , mixed mode)

With this you can be sure it is installed on my system however the command:

# echo $ JAVA_HOME
not yield anything, we review the path / etc / java and find a file java.conf


open it:

# nano / etc / java / java.conf

and see that there are many routes declared files openjdk




review if you have a file / etc / profile.d / java.sh in my case this file there is so java.conf copy the file to the / etc / profile.d / java.sh


# cp / etc / java / java.conf / etc / profile.d / java. sh


now edit, use the nano editor:


# nano / etc / profile.d / java.sh


export add statements here at the beginning of each line routes and add a final decision to export all the $ PATH variable




reboot and call:


# echo $ JAVA_HOME


should give us something like:
/ usr / lib / jvm / java





0 comments:

Post a Comment