-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 tags 346364 confirmed patch thanks
The first patch attached to this mail adds the JVM provided by the sun-java6-jre to the search-path under /etc/eclipse/java_home But wouldn't it be better to default to the value provided by /etc/alternatives/java (or at least check if it's available)? This should keep you/us out of trouble and you don't need to maintain a list of JVMs. Alternatively (or additionally) you could also check for the .*.jinfo-file under /usr/lib/jvm/ which should be generated by /usr/sbin/update-java-alternatives (provided by the package java-common). There should be (if a JRE/JDK is installed) a line like > jre java /usr/lib/jvm/java-6-sun/jre/bin/java In the attachment you find a patch for /usr/bin/eclipse which adds these two options (but I must admit that I hadn't time to test it). I think it's not quite beautiful and you can shorten it if you try to determine JAVACMD directly because /etc/alternatives and the line from the *.jinfo-file point directly to the executable. In any case it should run without errors (at least it had done so on my bash). In #347254 it is said that this problem is fixed but this bug is open (and I find that justified). So I would suggest to reopen #347254 and mark one of them as the duplicate of the other (or have I misunderstood something in the BTS?). Greetings, Kai P.S.: I've tagged this as "patched", but I haven't tested these patches (particularly the one which alters /usr/bin/eclipse) thoroughly. I hope that's ok, if not, feel free to remove the tag (in this case: sorry for being to fast *g*). - -- Kai Wasserbäch (Kai Wasserbaech) E-Mail: [EMAIL PROTECTED] Jabber (debianforum.de): Drizzt URL: http://wiki.debianforum.de/Drizzt_Do%27Urden GnuPG: 0xE1DE59D2 0600 96CE F3C8 E733 E5B6 1587 A309 D76C E1DE 59D2 (http://pgpkeys.pca.dfn.de/pks/lookup?search=0xE1DE59D2&fingerprint=on&hash=on&op=vindex) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQGVAwUBRxf7FqMJ12zh3lnSAQo0sgv/TpPnVIehN0HQLwKFyWXpXmGB1/o76VFO lYbf/uo2bFg+1H6TVn3TfWxOWBxRuJIEs7RkWTPUZdgj/RIUZ6Hl3rfMK2C+jg0N Bv4j+U1oraR5+wQM5+VURAAh+hD/Z7AvAivB1JQap/5mMI1GZ72M7dp542R/8VVL MQI5EEtUR5diiE3N4nswSfZthPZsePbsiZQXYugAl60DikpD5W+FNJy5R0jSu0w0 e1D59JuSAq0DuiMEIcZbilJPhRMMjG1wjIiy2BeUVX3UlKRoD/IBPlsDfESUS84O exURS+oXJhwvzY/wJBQaq2XHwCvd3o5VsUw+D23ymrkd6ALKxVCBxec/0BVz+8sH sxFKFmeXvkfCDF3g5uu3dH8eqNlhCej8wS+dC8VjcERl+fKUoYhXHLbbrO2/99ab vN0eg/dwGuNpsPpJZ1L9BrcU5Cvc4DFHcPNlIzq+rzgk75jrZfyk1ndfjuHCNiTr I5HMHh///W7Cdfsllx9wjnwfHmIhlI42 =T7sS -----END PGP SIGNATURE-----
--- etc/eclipse/java_home 2007-02-22 10:53:18.000000000 +0100 +++ updated/etc/eclipse/java_home 2007-10-18 23:38:31.000000000 +0200 @@ -5,6 +5,7 @@ /usr/lib/jvm/java-gcj /usr/lib/kaffe/pthreads /usr/lib/jvm/java-1.5.0-sun +/usr/lib/jvm/java-6-sun /usr/lib/j2se/1.5 /usr/lib/j2se/1.4 /usr/lib/j2sdk1.5-ibm
--- usr/bin/eclipse 2007-02-22 11:39:49.000000000 +0100 +++ updated/usr/bin/eclipse 2007-10-19 02:29:26.000000000 +0200 @@ -97,7 +97,27 @@ # If the user has not set JAVA_HOME, cycle through our list of compatible VM's # and pick the first one that exists. if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then - echo "searching for compatible vm..." + echo "trying to use vm given under /etc/alternatives..." + if [ -x "/etc/alternatives/java" ]; then + export JAVA_HOME=`ls -lh /etc/alternatives/java | cut -f10 -d" " | sed -e s/"\/jre\/bin\/java"//g` + echo "ok" + else + echo "not found" + fi +fi + +if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then # if not set... + echo -n "trying to use vm given in /usr/lib/jvm/.*.jinfo..." + if [ -r `ls /usr/lib/jvm/.*.jinfo` -a -x `cat /usr/lib/jvm/.*.jinfo | grep "jre java " | cut -f3 -d" "` ]; then + export JAVA_HOME=`cat /usr/lib/jvva-virtual-machinem/.*.jinfo | grep "jre java " | cut -f3 -d" " | sed -e s/"\/jre\/bin\/java"//g` + echo "ok" + else + echo "not found" + fi +fi + +if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then # if still not set... + echo -n "searching for compatible vm in /etc/eclipse/java_home (this shouldn't happen)..." javahomelist=`cat /etc/eclipse/java_home | grep -v '^#' | grep -v '^$' | while read line ; do echo -n $line ; echo -n ":" ; done` OFS="$IFS" IFS=":"
patch_to_add_path_to_java-6-sun.diff.sig
Description: Binary data
patch_to_use_alternatives_or_jinfo.diff.sig
Description: Binary data