Eric Lavarde - Debian wrote: > Speaking of alternatives, it would be nice to have a mean to completely > switch from one Java alternative to another. Currently you need to modify > more than 10 different alternatives in order to switch from e.g. kaffe to > Sun's Java or back. > I don't know how this could be fixed, but this is cumbersome. Wouldn't it > be possible to define only alternatives for java and javac, and everything > else would be slave alternatives of the both, depending if they're meant > to be Runtime or Development commands?
You are correct. A solution to this problem has been incorporated into java-common 0.25: update-java-alternatives(8) Each technology implementation defines the set of runtime, development and plugin alternatives in a file: /usr/lib/jvm/.$jname.jinfo Contents of /usr/lib/jvm/.java-1.5.0-sun.jinfo are shown below [1] This allows update-java-alternatives to switch the entire set of executables (and slaved man pages) to the desired implementation. An open issue (for which there is not yet a bug for java-common) is that we need to create a set of all possible alternatives (the union of all known .jinfo entries) in java-common so that update-java-alternatives can be modified to set the alternatives not available by a given implementation (i.e. the difference in of the sets [.all.jinfo - .$jname.jinfo]) to a noop implementation (and corresponding man page). In the case of executables this can simply be one shell script which says that the given command is not yet available for this implementation: $jname A second issue is update-java-alternatives needs to get an option like "update-alternatives --display" perhaps "update-java-alternatives --jname" which outputs the name of the currently chosen implementation. A third issue is that the test to see if update-java-alternatives is running as root should only be taken only if an action (and not just a query) is taken. As I am not (yet) a DD I cannot make these changes myself. More importantly does everyone agree with this approach? Please advise, --Tom [1] :::::::::::::: /usr/lib/jvm/.java-1.5.0-sun.jinfo :::::::::::::: name=java-1.5.0-sun-1.5.0.06 alias=java-1.5.0-sun priority=53 section=non-free jre ControlPanel /usr/lib/jvm/java-1.5.0-sun/jre/bin/ControlPanel jre java /usr/lib/jvm/java-1.5.0-sun/jre/bin/java jre java_vm /usr/lib/jvm/java-1.5.0-sun/jre/bin/java_vm jre javaws /usr/lib/jvm/java-1.5.0-sun/jre/bin/javaws jre keytool /usr/lib/jvm/java-1.5.0-sun/jre/bin/keytool jre pack200 /usr/lib/jvm/java-1.5.0-sun/jre/bin/pack200 jre policytool /usr/lib/jvm/java-1.5.0-sun/jre/bin/policytool jre rmid /usr/lib/jvm/java-1.5.0-sun/jre/bin/rmid jre rmiregistry /usr/lib/jvm/java-1.5.0-sun/jre/bin/rmiregistry jre unpack200 /usr/lib/jvm/java-1.5.0-sun/jre/bin/unpack200 jdk appletviewer /usr/lib/jvm/java-1.5.0-sun/bin/appletviewer jdk apt /usr/lib/jvm/java-1.5.0-sun/bin/apt jdk extcheck /usr/lib/jvm/java-1.5.0-sun/bin/extcheck jdk HtmlConverter /usr/lib/jvm/java-1.5.0-sun/bin/HtmlConverter jdk idlj /usr/lib/jvm/java-1.5.0-sun/bin/idlj jdk jar /usr/lib/jvm/java-1.5.0-sun/bin/jar jdk jarsigner /usr/lib/jvm/java-1.5.0-sun/bin/jarsigner jdk javac /usr/lib/jvm/java-1.5.0-sun/bin/javac jdk javadoc /usr/lib/jvm/java-1.5.0-sun/bin/javadoc jdk javah /usr/lib/jvm/java-1.5.0-sun/bin/javah jdk javap /usr/lib/jvm/java-1.5.0-sun/bin/javap jdk java-rmi.cgi /usr/lib/jvm/java-1.5.0-sun/bin/java-rmi.cgi jdk jconsole /usr/lib/jvm/java-1.5.0-sun/bin/jconsole jdk jdb /usr/lib/jvm/java-1.5.0-sun/bin/jdb jdk jinfo /usr/lib/jvm/java-1.5.0-sun/bin/jinfo jdk jmap /usr/lib/jvm/java-1.5.0-sun/bin/jmap jdk jps /usr/lib/jvm/java-1.5.0-sun/bin/jps jdk jsadebugd /usr/lib/jvm/java-1.5.0-sun/bin/jsadebugd jdk jstack /usr/lib/jvm/java-1.5.0-sun/bin/jstack jdk jstat /usr/lib/jvm/java-1.5.0-sun/bin/jstat jdk jstatd /usr/lib/jvm/java-1.5.0-sun/bin/jstatd jdk native2ascii /usr/lib/jvm/java-1.5.0-sun/bin/native2ascii jdk rmic /usr/lib/jvm/java-1.5.0-sun/bin/rmic jdk serialver /usr/lib/jvm/java-1.5.0-sun/bin/serialver plugin mozilla-javaplugin.so /usr/lib/jvm/java-1.5.0-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so plugin firefox-javaplugin.so /usr/lib/jvm/java-1.5.0-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so plugin mozilla-snapshot-javaplugin.so /usr/lib/jvm/java-1.5.0-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so :::::::::::::: -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]