Re: [opensuse] Editting PATH variable
- From: "Stan Goodman" <stan.goodman@xxxxxxxxxxxxx>
- Date: Fri, 7 Sep 2007 20:19:21 +0300
** Reply to message from G T Smith <grahamsmith@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
on Fri, 07 Sep 2007 15:21:38 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stan Goodman wrote:
The system is x86_64 openSuSE v10.2.
Previously, it contained jre v1.4.2, and PATH contained the string
</usr/lib64/jvm/jre/bin>.
Recently I updated to jre v1.6.0, and the new PATH string should be
</usr/java/jre1.6.0_02/bin> (but it remains as before, because I am not clear
on how to change it).
But then I decided that what I really need is a JDK, so I installed jdk
v1.6.0_02. The installer suggested installing in <~/jdk1.6.0_02/bin>, and I
accepted this. -- I am not uncomfortable with the JDK in the user directory,
with a JRE available for anyone else, so the new phrase in PATH should be
</usr/java/jre1.6.0_02/bin>, and the JDK equivalent should be in the user's
PATH.
The sources I have found from a Google search indicate that I should change the
global PATH variable by editing the file /etc/profile. But when I opened (as
root) that file, and searched for the string "jre" to find the place to edit, I
was unable to find it. Moreover, there is a warning at the top of that file
telling me that changes in the profile may not survive a system update, which
is discouraging. The fact that "jre" is not found at all is inexplicable to me,
since "jre" is known to be contained in the PATH, and I would like to
understand why it isn't present.
The 'Net offers much advice on how to add a directory to PATH by the sequence:
PATH = $PATH:<new string>
export PATH
but seems to ignore completely the question of changing existing directories.
How to go about this?
The first thing is that Java is a bit special about it handles these
things, the system path is usually irrelevant to java. JAVA_HOME is
important... as are a few other variables...
So far, I have been using full pathname to call java 1.6.0 to start java
applications (because PATH isn't correct for this version, as I said). I would,
however, like to make the needed correction, if for no other reason than to
shorten the command line in the scripts that call these apps. But I take your
point -- the other variables are important.
The jre that I installed was indeed installed through YaST from an rpm package:
<jre-1.6.0_02-fcs>, because I find it in YaST's Software Management tool. I do
not find the jdk; what is the method I need to use for removing it properly,
after which I will try to find the appropriate rpm package?
Although I removed the jre v1.4.2 package using YaST, I now find the following
two installed packages in Software Management:
jre-1_4_2-gci-compat
jre-1_4_2-gci-compat.32bit
I don't recognize these; shall I remove them, since there is no corresponding
jre?
Look at the following
/etc/java/java.conf
/etc/profile.d/alljava.sh
to get an idea of what is happening.
I would recommend using the SuSE rpms (particularly on x64 systems) as
things are a bit non standard (in a rather elegant manner).
--
Stan Goodman
Qiryat Tiv'on
Israel
REAL similes/metaphors by high school students; #19: The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] Editting PATH variable
- From: G T Smith
- Re: [opensuse] Editting PATH variable
- References:
- [opensuse] Editting PATH variable
- From: Stan Goodman
- Re: [opensuse] Editting PATH variable
- From: G T Smith
- [opensuse] Editting PATH variable
- Prev by Date: Re: [opensuse] USB IDE disk caddies [Was: Tape Drive for personal usage]
- Next by Date: Re: [opensuse] list cops blaming top posts
- Previous by thread: Re: [opensuse] Editting PATH variable
- Next by thread: Re: [opensuse] Editting PATH variable
- Index(es):
Relevant Pages
|