User Tools

Site Tools


java:java7onlinux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
java:java7onlinux [2012/02/27 23:46] – [Create an alteratives system for the new java] rlunarojava:java7onlinux [2022/12/02 22:02] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 I reproduce them for just in case the other site dissapears the entry. I reproduce them for just in case the other site dissapears the entry.
 +
 +[[InstallJdk8AlternativesUbuntu|The same for Java 8]]
  
 ===== Download and uncompress java ===== ===== Download and uncompress java =====
Line 125: Line 127:
  
 And after that, run ''update-alternatives --config java.  And after that, run ''update-alternatives --config java. 
 +
 +===== Set the JAVA_HOME and JAVA_ROOT for all users =====
 +
 +In the ''/etc/profile.d'' directory, add these files: 
 +
 +**alljava.csh**
 +
 +<code shell>
 +#
 +#    /etc/profile.d/alljava.csh
 +#
 +
 +#
 +# This script sets some environment variables for default java.
 +# Affected variables: JAVA_BINDIR, JAVA_HOME, JRE_HOME, 
 +#                     JDK_HOME, SDK_HOME
 +#
 +
 +setenv JAVA_ROOT /usr/java/default
 +setenv JAVA_HOME /usr/java/default
 +setenv JAVA_BINDIR /usr/java/default/bin
 +
 +
 +
 +</code>
 +
 +**alljava.sh**
 +
 +<code shell>
 +#                                                                              
 +#    /etc/profile.d/alljava.sh                                                 
 +#                                                                              
 +
 +export JAVA_ROOT=/usr/java/default
 +export JAVA_HOME=/usr/java/default
 +export JAVA_BINDIR=/usr/java/default/bin
 +unset JDK_HOME
 +unset SDK_HOME
 +
 +
 +
 +</code>
 +
 +
  
  
java/java7onlinux.1330382770.txt.gz · Last modified: 2022/12/02 22:02 (external edit)