Re: how can export java?

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

 



On Wed, 2009-04-01 at 17:35 -0400, chloe K wrote:
> Hi 
>  
> I edit .bash_profile. but it can't work 
>  
> PATH=$PATH:$HOME/bin
> JAVA_HOME="/opt/SUN/jdk/bin" 
> export PATH JAVA_HOME
>  
> what wrong I am?
>  
> and why I use ln -s /usr/sbin/java /opt/SUN/jdk/bin/java
>  
> it won't work properly
>  
> Thank you
----
this is what I do...YMMV

# cat /etc/profile.d/java.sh
#
export JAVA_HOME=/usr/java/jdk1.6.0_03
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/i386: \
$JAVA_HOME/jre/lib/i386/client
export JREHOME="/usr/java/jdk1.6.0_03/jre"

obviously you have to adjust for your paths... the idea is that all
logins will execute shell scripts in /etc/profile.d

and I would expect that you have your symbolic link wrong...

ln -s /opt/SUN/jdk/bin/java /usr/bin/java
      --------------------- -------------
          source for link     target for link

which will work if /usr/bin/java (target) doesn't already exist

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

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

  Powered by Linux