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 revisionBoth sides next revision
java:java7onlinux [2012/02/27 23:46] – [Create an alteratives system for the new java] rlunarojava:java7onlinux [2014/09/20 20:37] rlunaro
Line 125: Line 125:
  
 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