# java-config -L 1) Blackdown JDK 1.3.1 [blackdown-jdk-1.3] (/usr/share/java-config-2/vm/blackdown-jdk-1.3) *) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2] (/usr/share/java-config-2/vm/blackdown-jdk-1.4.2) 3) Blackdown JRE 1.4.2.03 [blackdown-jre-1.4.2] (/usr/share/java-config-2/vm/blackdown-jre-1.4.2) 4) IBM JDK 1.4.2.5 [ibm-jdk-bin-1.4] (/usr/share/java-config-2/vm/ibm-jdk-bin-1.4) 5) IBM JRE 1.4.2.5 [ibm-jre-bin-1.4] (/usr/share/java-config-2/vm/ibm-jre-bin-1.4) 6) WebLogic JRockit 1.4.2.11 [jrockit-jdk-bin-1.4] (/usr/share/java-config-2/vm/jrockit-jdk-bin-1.4) 7) WebLogic JRockit 1.5.0.06 [jrockit-jdk-bin-1.5] (/usr/share/java-config-2/vm/jrockit-jdk-bin-1.5) 8) Kaffe 1.1.7 [kaffe] (/usr/share/java-config-2/vm/kaffe) 9) Sun JDK 1.3.1.17 [sun-jdk-1.3] (/usr/share/java-config-2/vm/sun-jdk-1.3) 10) Sun JDK 1.4.2.12 [sun-jdk-1.4] (/usr/share/java-config-2/vm/sun-jdk-1.4) 11) Sun JDK 1.5.0.07 [sun-jdk-1.5] (/usr/share/java-config-2/vm/sun-jdk-1.5) 12) Sun JDK 1.6.0.0_beta95 [sun-jdk-1.6] (/usr/share/java-config-2/vm/sun-jdk-1.6) 13) Sun JRE 1.4.2.12 [sun-jre-bin-1.4] (/usr/share/java-config-2/vm/sun-jre-bin-1.4) 14) Sun JRE 1.5.0.08 [sun-jre-bin-1.5] (/usr/share/java-config-2/vm/sun-jre-bin-1.5) # java-config -O /opt/blackdown-jdk-1.4.2.03 # java-config --select-vm= -O /opt/sun-jre-bin-1.5.0.08 looks like java-config choses last entry when empty --select-vm is given - it should use system/user VM instead - just ignore --select-vm if it's empty. Proposed patch: Index: src/java-config-2 =================================================================== --- src/java-config-2 (revision 2951) +++ src/java-config-2 (working copy) @@ -258,6 +258,8 @@ def select_vm(option, opt, value, parser): vm = manager.get_vm(value) if vm: + if vm == '': + return manager.set_active_vm(manager.get_vm(value)) else: fatalError("The vm could not be found")
Sorry, correct patch: Index: src/java-config-2 =================================================================== --- src/java-config-2 (revision 2951) +++ src/java-config-2 (working copy) @@ -256,6 +256,8 @@ manager.clean_classpath(user_classpath_target()) def select_vm(option, opt, value, parser): + if value == '': + return vm = manager.get_vm(value) if vm: manager.set_active_vm(manager.get_vm(value))
I was the one that stumbled upon this bug. After applying the second patch below, it works fine. Here is the output of my patched java-config-2: # java-config-2 --select-vm= -O /opt/blackdown-jdk-1.4.2.03
Giving an error when --select-vm is empty is probably a better solution.
Regardless of the fix we do, we should belay doing a release that fixes this until after the new system stabilizes. I'd rather not do any more bumps until after its done.
(In reply to comment #3) > Giving an error when --select-vm is empty is probably a better solution. IMHO ignoring --select-vm if it has empty value is safer behaviour, and allows such use cases like in Resin's init.d script. If it errors on empty value passed - that adds additional code to check if it empty, do something, if it's not empty, do something other. Complicates it. I'm for ignoring it. (In reply to comment #4) > Regardless of the fix we do, we should belay doing a release that fixes this > until after the new system stabilizes. I'd rather not do any more bumps until > after its done.> It can be batched together with other fixes (if there are any) as rev-bumped to 2.0.30-r1
Josh: any progress on this issue?
Since things are stable now, it shouldn't be a problem going ahead with a bump. Although, I still stand by my previous statement, that not giving an argument should generate an error.
(In reply to comment #7) > Since things are stable now, it shouldn't be a problem going ahead with a bump. > > Although, I still stand by my previous statement, that not giving an argument > should generate an error. I've changed init.d script for resin-3.1.0 and resin-3.0.22 to behave well with empty GENTOO_VM, so I don't have any objections about making it generate an error after 3.0.22 goes stable.
(In reply to comment #7) > Since things are stable now, it shouldn't be a problem going ahead with a bump. > > Although, I still stand by my previous statement, that not giving an argument > should generate an error. resin-3.0.21 (which used empty GENTOO_VM) has been removed, so this bug is invalid now.