RE: shell script/export question - really a java question... libjvm.so

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

 



hi...

thanks for the reply to the shell question...

my real issue is with trying to get java to run. i have a dir where "java"
is a symbolic link to another symbolic link, which links to another..

when i type "./java" i get an error that indicates that it can't find a
libjvm.so. i figured that i'd try to set JAVA_HOME, and LD_LIBRARY_PATH to
see if that made/makes a difference.. it doesn't appear to..

anybody have any thoughts/suggestions on this..

i'm running a linux/redhat system, with the following...

[root@bingo bin]# java -version
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
Classic VM (build 1.4.1, J2RE 1.4.1 IBM build cxia321411-20040301 (JIT
enabled: jitc))

thanks

-bruce


-----Original Message-----
From: Wojciech Komornicki [mailto:wnk@xxxxxxxxxxx]
Sent: Saturday, March 04, 2006 3:36 PM
To: bedouglas@xxxxxxxxxxxxx; fedora-list@xxxxxxxxxx
Subject: shell script/export question


>>>>> "bruce" == bruce  <bedouglas@xxxxxxxxxxxxx> writes:

  bruce:> hi..
  bruce:> i have the following simple script...

  bruce:> # .foo
  bruce:> # User specific environment and startup programs

  bruce:> JAVA_HOME=/opt/IBMJava2-141
  bruce:> export JAVA_HOME

  bruce:> -------------------

  bruce:> when i do a >./foo.sh, and then do a echo $JAVA_HOME, i don't see
the
  bruce:> exported variable. foo.sh has the exe bit set (777). any idea what
i'm doing
  bruce:> wrong. i'm using fc4. i'm basically trying to figure out how to
create a env
  bruce:> var, and export the var.

When you run a program as
    > ./foo.sh
(I am assumine that > is your shell prompt) you spawn a new shell

If you run the program as
    > . ./foo.sh
you are telling the current shell to execute the commands in foo.sh.  In
the first instance you are setting and exporting the variable JAVA_HOME
in the spawned shell.  When that shell closes upon exit from foo.sh the
evironment variable is lost.  I the second instance you are setting the
shell variable for the current shell.

--
Wojciech Komornicki


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

  Powered by Linux