Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17696 - Suggestion: java-config --list-available-vms should list current VM
Summary: Suggestion: java-config --list-available-vms should list current VM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Adrian Almenar
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-17 12:14 UTC by Narada Sage
Modified: 2003-04-01 16:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Narada Sage 2003-03-17 12:14:08 UTC
I would like to make the suggestion that when running

java-config --list-available-vms

it should somehow indicate the VM that's currently in use with the help of an
asterisk or otherwise.  I realise that there may be other parameters to action
this task but listing all available vms should be intuitive and provide some
indication.  Also, my second suggestion is that when running

java-config --set-system-vm=<vmname>

it should follow the setting of the new vm with an automatic env-update (and
possibly a source /etc/profile).  This is to safeguard against the user
forgetting to do it.  Many thanks.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




----
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
GENTOO_MIRRORS="http://gentoo.linux.no/
http://ftp.tu-clausthal.de/pub/linux/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ "
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg kde libg++ libwww mikmod
mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib
gtkhtml gdbm berkdb slang readline arts bonobo svga java guile X sdl gpm tcpd
pam ssl perl python imlib oggvorbis gnome gtk qt motif opengl aalib acpi cdr
directfb dvd esd fbcon gtk2 imap mozilla nas sse tcltk tiff usb xml"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=4 -fprefetch-loop-arrays -funroll-loops"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=4 -fprefetch-loop-arrays -funroll-loops"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j4"
AUTOCLEAN="yes"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
----

----
java-config --list-available-vms
[sun-jdk-1.4.1.02] Sun JDK 1.4.1.02 (/etc/env.d/java/20sun-jdk-1.4.1.02) 
[blackdown-jdk-1.3.1] Blackdown JDK 1.3.1 (/etc/env.d/java/20blackdown-jdk-1.3.1) 
[blackdown-jdk-1.4.1] Blackdown JDK 1.4.1 (/etc/env.d/java/20blackdown-jdk-1.4.1) 
----
Comment 1 Narada Sage 2003-03-18 11:26:56 UTC
An additional suggestion is that when a system or user VM has been set using java-config and that particular VM (or SDK) is upgraded and as a result the old VM (or SDK) is unmerged then java-config should modify the current system or user VM to be the newly merged VM (or SDK).  At the moment if an JRE or SDK is upgraded java-config is still set to be the old version which then becomes unmerged leaving things in a slightly broken state.  If this is automated then the system becomes more robust.  I'd be curious to hear your thoughts on this matter.
Comment 2 Adrian Almenar 2003-03-22 12:19:30 UTC
I made some changes to java-config (New version as today on testing == 0.2.8). 
 
That for now, indicates the VM youre using when you run java-config 
--list-available-vms. 
 
Also when you change a vm it says a message about what you need to make 
effective the changes youve done with java-config. 
 
And updated the man page to understand how to set the vm. 
 
Try this. I know that this script needs some work for being better but this is a first step.  
Comment 3 Narada Sage 2003-03-22 12:49:42 UTC
Hello.  Many thanks for acting so promptly on implementing the new features.  Also, the use of colour improves the appearance considerably.  I look forward to this release going stable - in my case there's been no problems as yet.

There's a few things I'd to bring up.

1) The homepage: http://cvs.gentoo.org/~karltk/projects/java-config
listed on emerge -s java-config does not work.  Perhaps an update or fix may be an idea.
2) Is there any way to apply the new system vm without the need to login again?  In the past at times env-update has applied the changes immediately and at other times I've had to relogin.  What does the relogin assert that makes the change and can this be automated with the set-sytem-vm call?
Comment 4 Adrian Almenar 2003-03-22 15:40:49 UTC
Its quite simple the problem of relogin: 
 
1.- When you run java-config as the root user and then set the VM to xxxx-{jdk,jre} 
you want you need to run env-update so changes get inside /etc/profile.env then this 
file is sourced to all users when they login. 
 
2.- If you dont source this file the ENV variables will not get to your terminal, shell, 
console, etc, so you dont get the new configuration available. 
 
Thats why you need to relogin. 
Comment 5 Daniel Robbins (RETIRED) gentoo-dev 2003-04-01 16:34:38 UTC
I just committed an updated java-config-1.3 (unmasked for x86) that contains a minor cosmetic fix that tells you how to avoid re-logging in. Closing this bug.