| Author |
environment variable in red hat 4.5.3
|
Pravin Shirke
Ranch Hand
Joined: Apr 05, 2008
Posts: 146
|
|
hi all, i have installed extracted jdk-6u7-linux-i586.bin to /usr directory and created a link by the name java. so the path to java is /usr/java now when i try to set the environment variable for it in /etc/profile by adding this code JAVA_HOME="/usr/java" export JAVA_HOME it gives me this error: : command not found : command not found 'bash: /etc/profile: line 6: syntax error near unexpected token `{ 'bash: /etc/profile: line 6: `pathmunge () { help me as its urgent. how do i set the environment variable for it.. thank you
|
[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12907
|
|
|
It looks like you've messed up your .profile. Can you show us the complete contents of your .profile?
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Pravin Shirke
Ranch Hand
Joined: Apr 05, 2008
Posts: 146
|
|
here is the entire file i have just added the JAVA_HOME. # /etc/profile # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc pathmunge () { if ! echo $PATH | /bin/egrep -q "(^| $1($| " ; then if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } # Path manipulation if [ `id -u` = 0 ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin fi pathmunge /usr/X11R6/bin after unset pathmunge # No core files by default ulimit -S -c 0 > /dev/null 2>&1 USER="`id -un`" LOGNAME=$USER MAIL="/var/spool/mail/$USER" HOSTNAME=`/bin/hostname` HISTSIZE=1000 if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then INPUTRC=/etc/inputrc fi export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then . $i fi done unset i JAVA_HOME="/usr/java" export JAVA_HOME
|
 |
Pravin Shirke
Ranch Hand
Joined: Apr 05, 2008
Posts: 146
|
|
|
any body kindly suggest please
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
Red Hat version 4 is so old that the only reason anyone should be using it is if they have a 486 machine. If you mean Red Hat Enterprise 4, I recommend installing the RPM. You main problem, however, is that Sun designed it so that multiple versions of Java can live on the same machine. So if I wanted to run a Java 5 JVM, I'd set JAVA_HOME to something like /usr/java/jdk1.5.0_06 to select that version.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: environment variable in red hat 4.5.3
|
|
|