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
Next revisionBoth sides next revision
java:java7onlinux [2012/02/27 23:46] – [Create an alteratives system for the new java] rlunarojava:java7onlinux [2014/10/01 00:17] rlunaro
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
 +#
 +# send feedback to http://bugs.opensuse.org
 +
 +#
 +# 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                                                 
 +#                                                                              
 +# send feedback to http://bugs.opensuse.org
 +
 +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.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1