Re: Java policy: finding the base directory of the default JRE/JDK
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mon, 15 Nov 2004 21:42:49 -0800,
Shyamal Prasad <shyamalprasad@verizon.net> wrote:
> Hi,
>
> I have a system that is installed according to the Debian policy
> documents (including Java policy). On this system I am trying to find
> the "base Java directory" for the default Java environment.
>
> Is it correct for me to chase symlinks from /usr/bin/java until I find
> the actual executable, and work backwards?
>
> For example, on my system: /usr/bin/java --> /etc/alternatives/java
> --> /usr/lib/j2se/1.3/bin/java --> /usr/lib/j2se/1.3/bin/.java_wrapper
> (Blackdown Java) which allows me to deduce that the "base java
> directory" is /usr/lib/j2se/1.3.
>
> Will this work for all Debian JVM (and compiler) packages as long as
> the alternatives system is correctly set up?
Yes, it should.
> If not, how can I find the base of the distribution in general?
I don't understand.
> From the base directory can I assume I can find bin/java (if a VM is
> installed), and bin/javac (if a compiler is installed)?
update-alternatives --display java
update-alternatives --display javac
etc...
> Perhaps even lib/tools.jar, or is that a Sun thing only?
Yes it is. The JAVA_HOME env var also. It can be set if you install
kaffe or free-java-sdk (or any other non-free JDK)... but with free JDK,
you'll not find tool.jar.
> Or can java and javac be from different packages (the policy document
> certainly makes it seem so)?
Yes. I only list free once.
o Runtimes: sablevm, jamvm, gij, kaffe, kissme (I'm not sure it's
still alive?)
o Compilers: jikes, kjc, gcj.
> I'm trying to isolate what seems to be a fault in the Emacs/XEmacs JDE
> package and it boils down to not chasing symlinks from /usr/bin/java
> to find the equivalent of JAVA_HOME.
See kaffe and free-java-sdk and point JAVA_HOME to /usr/lib/kaffe or
/usr/lib/fjsdk
> I do not do any Java development anymore, and I've only ever used
> Blackdown on Debian, so any input would help.
Maybe I'm too curious, but if you don't do java dev any more, why do you
ask?! :-D
Cheers,
- --
.''`.
: :' :rnaud
`. `'
`-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBmer34vzFZu62tMIRAtE9AJ9tV0zmEymqYzXPp7rEalk1KQAiOwCfSTcc
hpS1CikdDmiVhTzW1T2/17g=
=SflP
-----END PGP SIGNATURE-----
Reply to: