I browsed through the latest Debian Java Policy
doc, but didn't see anything that looked like it addressed this problem, so I'll
ask...
One of my clients has a web site that's visited by
people with old browsers that don't really handle applets compiled by JDK 1.1 or
higher. For this reason, I kinda have to keep JDK 1.0 around. However, I
sometimes need JDK 1.1 for other projects.
As things stand now, I either have to keep them on
separate machines or wrestle with the stuff in /etc/alternates.
On my Windows machines that I use, I have a couple
of batch files that let me switch back and forth. I type "jdk10" and any
subsequent "java", "appletviewer", or "javac" commands go to the JDK 1.0
installation. "jdk11" does the same for JDK 1.1.
It sure would be nice to be able to switch between
these this easily on Debian. However, it would have to be on a per-user basis,
so modifying things in /etc/alternatives doesn't really cut it.
Also, it would be nice if there was a file
somewhere (like $HOME/.javarc or $HOME/classpaths) where one could specify paths
and jars that they wanted included no matter what JVM they ran. After having to
add about 7 or 8 items like "/usr/share/java/javax.activation.jar" to my
classpath variable in .bash_profile AND .bashrc, you get a little sick of it.
Another nifty thing would be if there were a directory where a
user could put jars (or symlinks to them, of course) and the directory
would be scanned and all jars would automatically be put in the classpath that
gets passed to the JVM. So, for example, there could be a directory like
$HOME/.java/jars that contained a few .jar files. The scripts that launch the
JVMs could check that directory and add the paths to those jars to the classpath
fed to the JVM.
What would be even *cooler* is if the user could
change this directory with an environment variable. This way, someone could have
multiple directories of jars all over the system that were for development on
different projects. So, something like "JARPATH=$HOME/projects/foo/jars" or
"JARPATH=$HOME/projects/bar/jars"
Is there going to be any development of the Debian
Java Policy towards something like this?
- Joe
|
- Re: How to manage multiple JVMs Joe Emenaker
- Re: How to manage multiple JVMs Seth Arnold
- Re: How to manage multiple JVMs Patrick Tullmann