[ Answering old mail. ] On Tue, Jul 03, 2001 at 09:34:49PM -0500, Ben Burton wrote: > Hi. Policy states that Java programs must run without specific environment > variables, which can be some hassle when writing a program that works with > several JVMs. Different JVMs use different bootstrap classes - which > sometimes need to be passed on the command line (eg. kaffe) - and often even > have different binaries for execution (/usr/bin/java, /usr/bin/kaffe, etc). > > I have written a script that will try to guess which command to use for the > java runtime and which bootstrap classes need to be passed on the command > line.
I think this is a terrible idea (no offense intended). The JVM executable should not need any special parameters to find its bootstrap classes, etc. The Debian packager should take care of this with a wrapper if needed. Nor should you need to search for the JVM executable, because Debian already has a mechanism for choosing between implementations. You should just run /usr/bin/java (or some other standard name; maybe it needs to have version number, but that's a separate issue), period. Your script punishes the Debian developer who creates a clean package for a new JVM, that registers an alternative for /usr/bin/java and runs without any special help. Users should be able to install that package and have it just work. Sun should have, a long time ago, specified a standard way to distribute a Java program such that it "just works" with any JVM. However, they have no incentive since they want you to use their JVM, and in fact they discourage the idea by distributing their Java programs with awful scripts that poke around in your JVM installation. Debian should not follow their example. Don't you want to put an end to this madness? Andrew