Fw: CLASSPATH and Jikes
> It would be nice to have debconf provide a list of suitable installed
> JVM's. It could also have another option to select the path of a non-deb
> JDK installation.
On a related note....
After having just made some .debs for j2sdk1.4, jbuilder6, and jEdit, I had
to write a couple of startup scripts that check the system for the "usual"
jdk's: /usr/lib/j2sdk1.3, /usr/lib/jdk1.1, etc. Almost all java-based apps
in Debian do this... and each one has its own order of preference for the
various jvm's, etc.
It occured to me that we could benefit from some config file in /etc that
spelled out the prefered jvm's... as a default and for individual packages.
Imagine something like this:
# JVM's that are really on this machine
[JVM]
JRE11=/usr/lib/jre1.1/bin/java
JDK13=/usr/lib/j2sdk1.3/jre/bin/java
JDK14=/usr/local/lib/j2sdk1.4/jre/bin/java
# What order we want to try JVM's in
[PREFERENCE]
Default=JDK13 JDK12 JDK11 KAFFE
jEdit=KAFFE JDK14 JDK13
jbuilder6=JDK13
Then, we could have a tool called, say, "get-preferred-jvm" where you could
pass it the name of the package you were trying to run.
So, for example, the script at /usr/bin/jedit, would first do a
"get-preferred-jvm jEdit". This would return the path to JDK1.4
"/usr/local/lib/j2sdk1.4/bin/java". It *would* have returned the path to
kaffe, which is preferred over JDK 1.4, but kaffe doesn't appear in the
[JVM] section and is assumed to not be installed.
Trying something like "get-preferred-jvm Tomcat" would return the default
system preference (in this case, JDK 1.3), since Tomcat wasn't explicitly
mentioned in the [PREFERENCE] section.
So, each package that *uses* a JVM would have the option of adding a line in
the [PREFERENCE] section... and each package that *provides* a JVM would
place itself in the [JVM] section and also, at install/config time, allow
the user to alter the Default preference.
The big benefit that I see here is when you install a new JVM (say, JDK 1.4)
that most packages didn't even know about at the time they were built.
Provided that the [PREFERENCE] section stays mostly empty (in other words,
that most packages that need a JVM just accept whatever the Default is),
then you can install a new JVM and immediately have just about every
java-based app using it.
- Joe
--
To UNSUBSCRIBE, email to debian-java-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: