We need to update the changes to the ~/.bash_profile export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.7_8.x86_64/jre/bin/ Now there are two levels we can setup the visibility of JAVA_HOME environment variable.ฤก. In order to set the system JAVA_HOME path on the system we need to export this variable, for the obvious reasons of other programs and users using the classpath such as while using maven or a servlet container. This enabled openjdk1.8 to be the default version of java. There are 2 programs which provide 'java'. We make use of the alternatives command in centos which lists if we have any other version of java installed on the machine, and then enabling the default java version on the system wide. OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) OpenJDK Runtime Environment (build 1.8.0_252-b09) We have installed the java openjdk 1.8 and we can check the version using java -version ~]$ java -version We will be using the yum command to download the openjdk 1.8 and install ~]$ sudo yum install java-1.8.0-openjdk.x86_64 In this tutorial we will quickly setup java on linux centos,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |