Re: plugin: JRE in JDK for firefox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 12, 2005 9:57 PM, Kam Leo <kam.leo@xxxxxxxxx> wrote:
[..]
> > I want every user to have the java,javac,jar
> > (and anything else which is related).  Is there a single file 
> > which
> > can be edited to do that?
> >
> > thanks,
> >
> > Thufir
> >
> 
> I have not found one.  What I end up doing is creating  
> symbolic links
> for java and javac in /usr/bin and adding shell scripts in
> /etc/profile.d to create the environment variables.  I found 
> these two
> off the web:
> 
> # /etc/profile.d/java.sh - Sets Java Environment
> #
> if [ -z "$JAVA_HOME" ]; then
>   if [ -e /etc/javaversion ]; then
>     javaver=`cat /etc/javaversion | head -1`
>   fi
>   if [ -z $javaver ]; then
>     jdkpath=`ls -1 /usr/java/ | grep "$javaver" | head -1`
>     if [ "X$jdkpath" == "X" ]; then
>       jdkpath=`ls -1 /usr/java/ | head -1`
>     fi
>   else
>     jdkpath=`ls -1 /usr/java/ | head -1`
>   fi
>   export JAVA_HOME=/usr/java/$jdkpath
>   export PATH=${PATH}:${JAVA_HOME}/bin
>   export CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
>   export JRE_HOME=$JAVA_HOME/jre
>   export JDK_HOME=$JAVA_HOME
>   export SDK_HOME=$JAVA_HOME
>   export JAVA_ROOT=$JAVA_HOME
>   export JAVA_BINDIR=$JAVA_HOME/bin
> fi
> 
> # /etc/profile.d/java.csh - Sets Java Environment
> #
> if ( ! $?JAVA_HOME ) then
>   if ( -e /etc/javaversion ) then
>     set javaver = `cat /etc/javaversion | head -1 `
>   endif if ( $?javaver ) then
>     set jdkpath = `ls -1 /usr/java/ | grep '$javaver' | head -1`
>      if ( $jdkpath == '' ) then
>       set jdkpath = `ls -1 /usr/java/ | head -1`
>     endif
>   else
>     set jdkpath = `ls -1 /usr/java/ | head -1`
>   endif setenv JAVA_HOME /usr/java/$jdkpath
>   setenv PATH ${PATH}:${JAVA_HOME}/bin
>   setenv JAVA_ROOT ${JAVA_HOME}
>   setenv JAVA_BINDIR ${JAVA_HOME}/bin
>   setenv JRE_HOME ${JAVA_HOME}/jre
>   setenv JDK_HOME ${JAVA_HOME}
>   setenv SDK_HOME ${JAVA_HOME}
>   setenv CLASSPATH ${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
> endif
> 
> You can also use "alternatives" to accomplish some of this.
> 


thanks, I'll give it a go :)

Thufir


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux