Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20559 - java-config --set-user-vm should replace system vm on $PATH and $CLASSPATH
Summary: java-config --set-user-vm should replace system vm on $PATH and $CLASSPATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 31468
  Show dependency tree
 
Reported: 2003-05-06 21:21 UTC by Cesar Eduardo Barros
Modified: 2003-11-08 10:36 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 Cesar Eduardo Barros 2003-05-06 21:21:48 UTC
The ~/.gentoo/java-env file generated by java-config 0.2.8 --set-user-vm appends
to the end of $PATH, which already has the system vm from /etc/profile.env. It
should use something like
PATH=$(echo $PATH | perl -pe "s|`grep ^PATH /etc/env.d/20java | cut -f2-
-d=`|_newpath_|")
where _newpath_ is the PATH= for the vm selected by --set-user-vm

Also, the CLASSPATH is wrong; it lacks the contents of
/etc/env.d/30java-finalclaspath (it probably needs to be set using the same
method, which will work fine even if something else in /etc/env.d sets the
CLASSPATH).

The syntax I gave is full of bashisms, so probably can't be used as-is.

Reproducible: Always
Steps to Reproduce:
1.Install two different jdks
2.Set the system vm to one of them
3.Try to set the user vm to another one
Actual Results:  
$HOME/.gentoo/java-env is created which appends to the PATH and replaces the
CLASSPATH with something which does not end in :.

Expected Results:  
$HOME/.gentoo/java-env which replaces the part of $PATH pointing to the system
vm with the right value for the user vm and replaces the part of $CLASSPATH
added by the system vm with the one added by the user vm.

Other variables might need the same treatment.

The java-config version is 0.2.8

This bug makes --set-user-vm next to useless
Comment 1 Adrian Almenar 2003-07-01 20:44:12 UTC
Im not having enough time to work on gentoo NOW, i can help on these later.
Comment 2 Adrian Almenar 2003-11-08 10:36:58 UTC
Fixed on java-config CVS, will be available in java-config 1.1.5.

Reopen if you have problems.