Re: Where is the appropriate location for setting a default JDK?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
nicole wrote:
| Hi Barry,
|
|
|>On Thu, 28 Oct 2004 13:29:45 -0400, Barry Hawkins <barry@alltc.com> wrote:
|
|
| <snip> Solution 1:
|
|
|># IBM Java 1.4.2 SDK settings
|>export JAVA_HOME=/opt/IBMJava2-ppc-142
|>export PATH="${PATH}":"${JAVA_HOME}"/bin
|>export PATH="${PATH}":"${JAVA_HOME}"/jre/bin
|>
|>which works fine for things I launch from a shell. However, for things
|>like a KDE Application Button to launch Eclipse, this does nothing.
|
|
|>~ I am wondering that the most appropriate location would be for
|>setting the JAVA_HOME and associated PATH additions to indicate a
|>system-wide default JDK for my Debian installations. I am currently
|>thinking of /etc/bash.bashrc, but because that may be overwritten when
|>bash upgrades, I am unsure. Can some of you tell me best practices
|>and/or recommendations for this?
|
|
| In the past, I have used alternatives for this. Basically, I set
| "/usr/bin/java" and all of the normal command line options to go to the
| correct JVM, rather than the default. If I want to go back to the other, I
| can change the alternatives choice and it fixes the /usr/bin/java links
| for me.
|
| Here is one example. In this case, I am using a full JDK, and it is in
| /usr/local/lib/java/j2sdk1.4.2_05.
|
| Installing the Alternatives:
|
| # update-alternatives --install /usr/bin/javac javac
| /usr/local/lib/java/j2sdk1.4.2_05/bin/javac 1000 --slave
| /usr/local/lib/java/j2sdk1.4.2_05/man/man1/javac.1.gz javac.1.gz
| /usr/share/man/man1/javac.j2sdk14.1.gz
|
[...]
| I am not sure if this is the "correct" way, but it seems to have worked
| just fine for me.
|
| -nicole
|
|
Nicole,
~ Wow, That's pretty neat. I didn't even know about
update-alternatives; where did you learn about that?
- --
Barry Hawkins
All Things Computed
site: www.alltc.com
weblog: www.yepthatsme.com
Registered Linux User #368650
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBgUwJ7bZ6kUftWZwRAtfsAKDE5bpCU2q87FZUCklgJPUClQH0xwCgreF+
FRTmRBH7dy5Cmm9xDd6QbF0=
=1ZM7
-----END PGP SIGNATURE-----
Reply to: