[gentoo-user] Re: Java problem

2010-05-24 Thread walt

On 05/23/2010 06:26 PM, David Relson wrote:

On Sun, 23 May 2010 11:01:53 -0700
walt wrote:


On 05/23/2010 09:56 AM, David Relson wrote:


Output of emerge -d ant-junit is attached, though I don't
understand what the additional info means.


The 'build.log' should contain the actual error message following the
test for the system-vm.  The test code will look something like this:

+ java-pkg_switch-vm
+ debug-print-function java-pkg_switch-vm
+ str='java-pkg_switch-vm: entering function'
+ shift
+ debug-print 'java-pkg_switch-vm: entering function, parameters: '
+ '[' '!' -d /media/d/portage/dev-java/ant-junit-1.7.1/temp ']'
+ '[' 'java-pkg_switch-vm: entering function, parameters: ' ']'
+ '[' '' == on ']'
+ '[' -n '' ']'
+ echo 'java-pkg_switch-vm: entering function, parameters: '
+ chmod
g+w /media/d/portage/dev-java/ant-junit-1.7.1/temp/eclass-debug.log
+ shift
+ '[' '' ']'
+ java-pkg_needs-vm
+ debug-print-function java-pkg_needs-vm
lots of snippage

There are no error messages in my build.log but I expect there will
be some obvious ones in yours.



Hi Walt,

What build.log file do you mean?


/var/tmp/portage/dev-java/ant-junit-1.7.1/temp/build.log (unless you
changed the default $PORTAGE_TMPDIR in make.conf).  The eclass-debug.log
is in the same directory.


Running emerge -d ant-junit produces files:

   /var/log/portage/dev-java:ant-junit-1.7.1:20100524-010955.log
   /var/log/portage/elog/dev-java:ant-junit-1.7.1:20100524-010957.log


Thanks, I never knew about those logs.  Maybe they only appear if the
build fails because I don't have them on my machine.


I found java-pkg_needs-vm in /usr/portage/eclass/java-utils-2.eclass.
However equery belongs /usr/portage/eclass/java-utils-2.eclass
doesn't find an owning package for this file.  Do you have this file?
What package owns it?


As Kenneth said, it doesn't belong to any one package, but eclass files
are useful for storing code that can be shared by several similar packages,
like a group of related java packages.

The ant-junit-1.7.1.ebuild file says inherit ant-tasks, which means
that the ant-tasks.eclass file is read before beginning the actual build.
You can see the sequence of events in the eclass-debug.log.




Re: [gentoo-user] Re: Java problem

2010-05-24 Thread David Relson
On Mon, 24 May 2010 04:11:45 -0700
walt wrote:

 On 05/23/2010 06:26 PM, David Relson wrote:
  On Sun, 23 May 2010 11:01:53 -0700
  walt wrote:
 
  On 05/23/2010 09:56 AM, David Relson wrote:
 
  Output of emerge -d ant-junit is attached, though I don't
  understand what the additional info means.
 
  The 'build.log' should contain the actual error message following
  the test for the system-vm.  The test code will look something
  like this:
 
  + java-pkg_switch-vm
  + debug-print-function java-pkg_switch-vm
  + str='java-pkg_switch-vm: entering function'
  + shift
  + debug-print 'java-pkg_switch-vm: entering function, parameters: '
  + '[' '!' -d /media/d/portage/dev-java/ant-junit-1.7.1/temp ']'
  + '[' 'java-pkg_switch-vm: entering function, parameters: ' ']'
  + '[' '' == on ']'
  + '[' -n '' ']'
  + echo 'java-pkg_switch-vm: entering function, parameters: '
  + chmod
  g+w /media/d/portage/dev-java/ant-junit-1.7.1/temp/eclass-debug.log
  + shift
  + '[' '' ']'
  + java-pkg_needs-vm
  + debug-print-function java-pkg_needs-vm
  lots of snippage
 
  There are no error messages in my build.log but I expect there will
  be some obvious ones in yours.
 
 
  Hi Walt,
 
  What build.log file do you mean?
 
 /var/tmp/portage/dev-java/ant-junit-1.7.1/temp/build.log (unless you
 changed the default $PORTAGE_TMPDIR in make.conf).  The
 eclass-debug.log is in the same directory.
 
  Running emerge -d ant-junit produces files:
 
 /var/log/portage/dev-java:ant-junit-1.7.1:20100524-010955.log
 /var/log/portage/elog/dev-java:ant-junit-1.7.1:20100524-010957.log
 
with PORT_LOGDIR=/var/log/portage in /etc/make.conf, the build.log
files go into /var/log/portage (as reported above).

 Thanks, I never knew about those logs.  Maybe they only appear if the
 build fails because I don't have them on my machine.
 
  I found java-pkg_needs-vm
  in /usr/portage/eclass/java-utils-2.eclass. However equery
  belongs /usr/portage/eclass/java-utils-2.eclass doesn't find an
  owning package for this file.  Do you have this file? What package
  owns it?
 
 As Kenneth said, it doesn't belong to any one package, but eclass
 files are useful for storing code that can be shared by several
 similar packages, like a group of related java packages.
 
 The ant-junit-1.7.1.ebuild file says inherit ant-tasks, which means
 that the ant-tasks.eclass file is read before beginning the actual
 build. You can see the sequence of events in the eclass-debug.log.
 

I've had an initial response from b.g.o. and will follow along with
that as well as this thread.

Attached is the eclass-debug.log file which contains:

  java-pkg_switch-vm: entering function, parameters: 
  java-pkg_needs-vm: entering function, parameters: 
  depend-java-query:  NV_DEPEND:dev-java/junit:0
   =dev-java/java-config-2.1.9-r1 =sys-apps/portage-2.1.2.7

It seems wrong that the parameter list is empty.inherit: ant-tasks - /usr/portage/eclass/ant-tasks.eclass
*** Multiple Inheritence (Level: 2)
inherit: versionator - /usr/portage/eclass/versionator.eclass
inherit: java-pkg-2 - /usr/portage/eclass/java-pkg-2.eclass
*** Multiple Inheritence (Level: 3)
inherit: java-utils-2 - /usr/portage/eclass/java-utils-2.eclass
*** Multiple Inheritence (Level: 4)
inherit: eutils - /usr/portage/eclass/eutils.eclass
*** Multiple Inheritence (Level: 5)
inherit: multilib - /usr/portage/eclass/multilib.eclass
*** Multiple Inheritence (Level: 6)
inherit: toolchain-funcs - /usr/portage/eclass/toolchain-funcs.eclass
inherit: portability - /usr/portage/eclass/portability.eclass
inherit: versionator - /usr/portage/eclass/versionator.eclass
inherit: multilib - /usr/portage/eclass/multilib.eclass
EXPORT_FUNCTIONS: pkg_setup - java-pkg-2_pkg_setup
EXPORT_FUNCTIONS: src_compile - java-pkg-2_src_compile
EXPORT_FUNCTIONS: pkg_preinst - java-pkg-2_pkg_preinst
inherit: java-ant-2 - /usr/portage/eclass/java-ant-2.eclass
*** Multiple Inheritence (Level: 3)
inherit: java-utils-2 - /usr/portage/eclass/java-utils-2.eclass
*** Multiple Inheritence (Level: 4)
inherit: eutils - /usr/portage/eclass/eutils.eclass
*** Multiple Inheritence (Level: 5)
inherit: multilib - /usr/portage/eclass/multilib.eclass
inherit: portability - /usr/portage/eclass/portability.eclass
inherit: versionator - /usr/portage/eclass/versionator.eclass
inherit: multilib - /usr/portage/eclass/multilib.eclass
java-pkg_ant-tasks-depend: entering function, parameters: 
EXPORT_FUNCTIONS: src_unpack - ant-tasks_src_unpack
EXPORT_FUNCTIONS: src_compile - ant-tasks_src_compile
EXPORT_FUNCTIONS: src_install - ant-tasks_src_install
RDEPEND: not set... Setting to: dev-java/junit:0
java-pkg_init: entering function, parameters: 
java-pkg_init_paths_: entering function, parameters: 
JAVA_PKG_SHAREPATH: /usr/share/ant-junit
JAVA_PKG_ENV: /var/tmp/portage/dev-java/ant-junit-1.7.1/image//usr/share/ant-junit/package.env
JAVA_PKG_JARDEST: /usr/share/ant-junit/lib
JAVA_PKG_LIBDEST: /usr/lib64/ant-junit
JAVA_PKG_WARDEST: /usr/share/ant-junit/webapps

Re: [gentoo-user] Re: Java problem

2010-05-23 Thread David Relson
Walt and Kenneth,

Your help with this problem is appreciated, though the problem still
persists.

What versions of java do you guys have installed?  What does eselect
java-vm list show on your machines?

I'm on AMD64, what architectures are you running?

Looking around, /usr/bin/java is a symlink to run-java-tool which is
working.  For example java -version displays an appropriate value.


Output from multiple tests of eselect, java-config, and emerge is
attached.  To summarize the attachment:

 /usr/lib/jvm reports icedtea6 and sun-jdk-1.6.0.20

 eselect java-vm list shows sun-jdk as active

 eix -e --nocolor ant-core shows ant-core installed

 eselect java-vm set system 1 successfully changes to icedtea6

 emerge -qv ant-junit fails because ant-junit isn't found

 eselect java-vm set system 2 successfully changes to sun-jdk-1.6.0.20

 emerge -qv ant-junit fails because ant-junit isn't found

 notice that both icedtea6 and sun-jdk-1.6.0.20 have been tried and emerge 
ant-junit fails with both


On a related note,

 java-config -S only works for user 'root'.  It doesn't work for an 
individual user, e.g. 'relson'

 eselect java-vm set allows system-wide setting of the vm and also has a 
per-user option.

 Also, eselect includes an unnecessary (but harmless) / in the sym-link, i.e.

   eselect: current-system-vm - /usr/lib/jvm//icedtea6
   java-config: current-system-vm - /usr/lib/jvm/icedtea6



 On Sat, 22 May 2010 20:41:19 -0700
walt wrote:

 On 05/22/2010 01:10 PM, David Relson wrote:
 
* Unable to determine VM for building from dependencies:
*   Failed to determine VM for building.
 
 Well, I've seen those error messages more than once.  If I were
 half-a-bottle more sober, I'm sure I could remember how I fixed
 the problem.
 
 Gentoo offers two (competing?) ways to specify the system-vm.
 
 #eselect java-vm
 Usage: eselect java-vm action options
 Extra actions:
list  List Available Virtual Machines
set   Set a new system or user vm
show  Show the current vm
 
 #java-config
 Usage: java-config [options]
-L, --list-available-vms
  List available Java Virtual Machines
-S VM, --set-system-vm=VM
  Set the default Java VM for the system
 
 I seem to recall that the important things changed by these two
 gizmos are some symlinks like, for example:
 
 /etc/java-config-2/current-system-vm - /usr/lib/jvm//sun-jdk-1.6/
 /usr/bin/java - run-java-tool
 
 Maybe I can remember more details tomorrow.
 
 
 

/usr/lib/jvm has:

lrwxrwxrwx 1 root root 17 May 22 23:44 icedtea6 - /usr/lib/icedtea6
lrwxrwxrwx 1 root root 21 May 22 21:29 sun-jdk-1.6 - /opt/sun-jdk-1.6.0.20

eselect java-vm list reports:

Available Java Virtual Machines:
  [1]   icedtea6 
  [2]   sun-jdk-1.6  system-vm

eselect java-vm set system 1 runs without complaint, after which eselect 
java-vm list reports:

Available Java Virtual Machines:
  [1]   icedtea6  system-vm
  [2]   sun-jdk-1.6 

eix -e --nocolor ant-core reports:

[I] dev-java/ant-core
 Available versions:  1.7.1-r4{tbz2} ~1.7.1-r5 ~1.8.0-r1 ~1.8.0-r2 
~1.8.1 {doc elibc_FreeBSD source}
 Installed versions:  1.7.1-r4{tbz2}(08:02:48 AM 03/08/2010)(-doc 
-elibc_FreeBSD -source)
 Homepage:http://ant.apache.org/
 Description: Java-based build tool similar to 'make' that uses 
XML configuration files.

emerge -qv ant-junit fails because ant-junit isn't found

 * CPV:  dev-java/ant-junit-1.7.1
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: Package ant-junit was not found!
 * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0  =dev-java/java-config-2.1.9-r1 
=sys-apps/portage-2.1.2.7 

=sys-apps/portage-2.1.2.7
=dev-java/javatoolkit-0.3.0-r2 =virtual/jdk-1.4
=virtual/jre-1.4
~dev-java/ant-core-1.7.1
!dev-java/ant-tasks

r...@osage tmp # eselect java-vm set system 2

r...@osage tmp # eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea6 
  [2]   sun-jdk-1.6  system-vm

!!! Warning: VMs marked as Build Only may contain Security Vulnerabilities 
and/or be EOL.
!!! Warning: Gentoo recommends not setting these VMs as either your System or 
User VM.
!!! Warning: Please see http://www.gentoo.org/doc/en/java.xml#build-only for 
more information.

r...@osage tmp # emerge -qv ant-junit

 * CPV:  dev-java/ant-junit-1.7.1
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: Package ant-junit was not found!
 * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0  =dev-java/java-config-2.1.9-r1 
=sys-apps/portage-2.1.2.7 

=sys-apps/portage-2.1.2.7
=dev-java/javatoolkit-0.3.0-r2 =virtual/jdk-1.4
=virtual/jre-1.4

Re: [gentoo-user] Re: Java problem

2010-05-23 Thread Arttu V.
On 5/23/10, David Relson rel...@osagesoftware.com wrote:
  emerge -qv ant-junit fails because ant-junit isn't found

Is your portage tree or the underlying filesystem broken? You use eix,
so what does eix ant-junit output? Are there really no versions of
ant-junit available on your system?

Also, from your b.g.o report:

 EMERGE_DEFAULT_OPTS=--with-bdeps y --color=n --jobs 4

How about trying it without the parallel emerges?

-- 
Arttu V.



Re: [gentoo-user] Re: Java problem

2010-05-23 Thread David Relson
On Sun, 23 May 2010 17:32:50 +0300
Arttu V. wrote:

 On 5/23/10, David Relson rel...@osagesoftware.com wrote:
   emerge -qv ant-junit fails because ant-junit isn't found
 
 Is your portage tree or the underlying filesystem broken? You use eix,
 so what does eix ant-junit output? Are there really no versions of
 ant-junit available on your system?
 
 Also, from your b.g.o report:
 
  EMERGE_DEFAULT_OPTS=--with-bdeps y --color=n --jobs 4
 
 How about trying it without the parallel emerges?
 
 -- 
 Arttu V.

Hi Arttu,

The portage tree is fine, AFAICT.  emerge finds the ebuild, but
the emerge fails.  Removing --jobs 4 doesn't change the result.

ant-junit is not installed and emerge ant-junit fails (shown below).

The important failure line seems to be:

 * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0  =dev-java/java-config-2.1.9-r1

The ant-junit ebuild seems unusual because it doesn't download anything


### output of emerge ant-junit ###
Calculating dependencies... done!

 Verifying ebuild manifests

 Emerging (1 of 1) dev-java/ant-junit-1.7.1
 * apache-ant-1.7.1-src.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
[ ok ]
 * ant-1.7.1-gentoo.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...
[ ok ]
 * checking ebuild checksums ;-) ...
[ ok ]
 * checking auxfile checksums ;-) ...
[ ok ]
 * checking miscfile checksums ;-) ...
[ ok ]
 * CPV:  dev-java/ant-junit-1.7.1
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: Package ant-junit was not found!
 * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0  =dev-java/java-config-2.1.9-r1
=sys-apps/portage-2.1.2.7 
=sys-apps/portage-2.1.2.7
=dev-java/javatoolkit-0.3.0-r2 =virtual/jdk-1.4
=virtual/jre-1.4
~dev-java/ant-core-1.7.1
!dev-java/ant-tasks
 * ERROR: dev-java/ant-junit-1.7.1 failed:
 *   Failed to determine VM for building.
 * 
 * Call stack:
 * ebuild.sh, line   48:  Called pkg_setup
 * ebuild.sh, line 1346:  Called java-pkg-2_pkg_setup
 * java-pkg-2.eclass, line   63:  Called java-pkg_init
 *   java-utils-2.eclass, line 2126:  Called java-pkg_switch-vm
 *   java-utils-2.eclass, line 2550:  Called die
 * The specific snippet of code:
 *  die Failed to determine VM for
building.
 * 
 * If you need support, post the output of 'emerge --info
=dev-java/ant-junit-1.7.1',
 * the complete build log and the output of 'emerge -pqv
=dev-java/ant-junit-1.7.1'. !!! When you file a bug report, please
include the following information: GENTOO_VM=  CLASSPATH= JAVA_HOME=
JAVACFLAGS= COMPILER=
and of course, the output of emerge --info
 * The complete build log is located at
'/var/log/portage/dev-java:ant-junit-1.7.1:20100523-144943.log'.
 * The ebuild environment file is located at
'/var/tmp/portage/dev-java/ant-junit-1.7.1/temp/die.env'.
 * S: '/var/tmp/portage/dev-java/ant-junit-1.7.1/work/apache-ant-1.7.1'

 Failed to emerge dev-java/ant-junit-1.7.1, Log file:

  '/var/log/portage/dev-java:ant-junit-1.7.1:20100523-144943.log'



Re: [gentoo-user] Re: Java problem

2010-05-23 Thread Arttu V.
On 5/23/10, David Relson rel...@osagesoftware.com wrote:
 Hi Arttu,

 The portage tree is fine, AFAICT.  emerge finds the ebuild, but
 the emerge fails.  Removing --jobs 4 doesn't change the result.

Ok, then that could be discarded as just some wild speculation.

Next idea, how about just marking a single arch:

 ACCEPT_KEYWORDS=amd64 x86

I don't know if the java ebuilds, eclasses and wrapper-scripts are
wise enough to figure out the correct dependencies with such keywords.
I could imagine some part might figure out the arch as x86, but then
your system vm would be set to the x86_64 vm, i.e., no x86 system vm
set ... (again, just some more wild speculation ;) )

-- 
Arttu V.



[gentoo-user] Re: Java problem

2010-05-23 Thread walt

On 05/23/2010 07:57 AM, David Relson wrote:


The important failure line seems to be:

  * Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0=dev-java/java-config-2.1.9-r1


I'd suggest re-installing java-config-2 (just because), and then do
emerge -d ant-junit to get the debugging output.  Something useful may
appear in build.log or eclass-debug.log.



The ant-junit ebuild seems unusual because it doesn't download anything



Right, all the files come from the apache-ant tarball, and the ebuild takes
only a few seconds to run.




Re: [gentoo-user] Re: Java problem

2010-05-23 Thread David Relson
On Sun, 23 May 2010 18:16:53 +0300
Arttu V. wrote:

 On 5/23/10, David Relson rel...@osagesoftware.com wrote:
  Hi Arttu,
 
  The portage tree is fine, AFAICT.  emerge finds the ebuild, but
  the emerge fails.  Removing --jobs 4 doesn't change the result.
 
 Ok, then that could be discarded as just some wild speculation.
 
 Next idea, how about just marking a single arch:
 
  ACCEPT_KEYWORDS=amd64 x86

Wonder how that got there?  I must have been in a creative mood
when I did that.

The extra arch has been removed, but didn't help matters ...

 I don't know if the java ebuilds, eclasses and wrapper-scripts are
 wise enough to figure out the correct dependencies with such keywords.
 I could imagine some part might figure out the arch as x86, but then
 your system vm would be set to the x86_64 vm, i.e., no x86 system vm
 set ... (again, just some more wild speculation ;) )

Have started emerge -auNDtqv world.  Emerge has found a bunch of
packages to downgrade, including several java related ones.  I'll
report back later (after a family picnic this afternoon).

Regards,

David



[gentoo-user] Re: Java problem

2010-05-23 Thread walt

On 05/23/2010 09:56 AM, David Relson wrote:


Output of emerge -d ant-junit is attached, though I don't understand
what the additional info means.


The 'build.log' should contain the actual error message following the test
for the system-vm.  The test code will look something like this:

+ java-pkg_switch-vm
+ debug-print-function java-pkg_switch-vm
+ str='java-pkg_switch-vm: entering function'
+ shift
+ debug-print 'java-pkg_switch-vm: entering function, parameters: '
+ '[' '!' -d /media/d/portage/dev-java/ant-junit-1.7.1/temp ']'
+ '[' 'java-pkg_switch-vm: entering function, parameters: ' ']'
+ '[' '' == on ']'
+ '[' -n '' ']'
+ echo 'java-pkg_switch-vm: entering function, parameters: '
+ chmod g+w /media/d/portage/dev-java/ant-junit-1.7.1/temp/eclass-debug.log
+ shift
+ '[' '' ']'
+ java-pkg_needs-vm
+ debug-print-function java-pkg_needs-vm
lots of snippage

There are no error messages in my build.log but I expect there will be some
obvious ones in yours.




Re: [gentoo-user] Re: Java problem

2010-05-23 Thread David Relson
On Sun, 23 May 2010 11:01:53 -0700
walt wrote:

 On 05/23/2010 09:56 AM, David Relson wrote:
 
  Output of emerge -d ant-junit is attached, though I don't
  understand what the additional info means.
 
 The 'build.log' should contain the actual error message following the
 test for the system-vm.  The test code will look something like this:
 
 + java-pkg_switch-vm
 + debug-print-function java-pkg_switch-vm
 + str='java-pkg_switch-vm: entering function'
 + shift
 + debug-print 'java-pkg_switch-vm: entering function, parameters: '
 + '[' '!' -d /media/d/portage/dev-java/ant-junit-1.7.1/temp ']'
 + '[' 'java-pkg_switch-vm: entering function, parameters: ' ']'
 + '[' '' == on ']'
 + '[' -n '' ']'
 + echo 'java-pkg_switch-vm: entering function, parameters: '
 + chmod
 g+w /media/d/portage/dev-java/ant-junit-1.7.1/temp/eclass-debug.log
 + shift
 + '[' '' ']'
 + java-pkg_needs-vm
 + debug-print-function java-pkg_needs-vm
 lots of snippage
 
 There are no error messages in my build.log but I expect there will
 be some obvious ones in yours.
 

Hi Walt,

What build.log file do you mean?

Running emerge -d ant-junit produces files:

  /var/log/portage/dev-java:ant-junit-1.7.1:20100524-010955.log
  /var/log/portage/elog/dev-java:ant-junit-1.7.1:20100524-010957.log

Neither file mentions java-pkg_needs-vm.  From where does
java-pkg_needs-vm come?  Are there other files generated during
emerge -d ...?

I found java-pkg_needs-vm in /usr/portage/eclass/java-utils-2.eclass.
However equery belongs /usr/portage/eclass/java-utils-2.eclass
doesn't find an owning package for this file.  Do you have this file?
What package owns it?




Re: [gentoo-user] Re: Java problem

2010-05-23 Thread Kenneth Prugh
On Sun, 23 May 2010 21:26:29 -0400
David Relson rel...@osagesoftware.com wrote:
 I found java-pkg_needs-vm in /usr/portage/eclass/java-utils-2.eclass.
 However equery belongs /usr/portage/eclass/java-utils-2.eclass
 doesn't find an owning package for this file.  Do you have this file?
 What package owns it?

It's part of the portage tree, not any packages.



[gentoo-user] Re: Java problem

2010-05-22 Thread walt

On 05/22/2010 01:10 PM, David Relson wrote:


  * Unable to determine VM for building from dependencies:
  *   Failed to determine VM for building.


Well, I've seen those error messages more than once.  If I were
half-a-bottle more sober, I'm sure I could remember how I fixed
the problem.

Gentoo offers two (competing?) ways to specify the system-vm.

#eselect java-vm
Usage: eselect java-vm action options
Extra actions:
  list  List Available Virtual Machines
  set   Set a new system or user vm
  show  Show the current vm

#java-config
Usage: java-config [options]
  -L, --list-available-vms
List available Java Virtual Machines
  -S VM, --set-system-vm=VM
Set the default Java VM for the system

I seem to recall that the important things changed by these two
gizmos are some symlinks like, for example:

/etc/java-config-2/current-system-vm - /usr/lib/jvm//sun-jdk-1.6/
/usr/bin/java - run-java-tool

Maybe I can remember more details tomorrow.