1 |
Roy Wright wrote: |
2 |
> I have several java programs that I launch via scripts. Some are 1.4, |
3 |
> some are 1.5. |
4 |
> Just curious if there is a method to select the jvm from within the |
5 |
> script independent |
6 |
> of the system or user jvm? Something like: |
7 |
> |
8 |
> JAVACMD = `java-config --java 1.4` |
9 |
|
10 |
Yes, with GENTOO_VM and VMHANDLE of the jvm you want, like |
11 |
|
12 |
GENTOO_VM="sun-jdk-1.5" |
13 |
|
14 |
This will make all the wrapper scripts for java, javac, etc. call the |
15 |
binaries from selected VM. |
16 |
If your program also relies on JAVA_HOME, you can add this after the |
17 |
GENTOO_VM line: |
18 |
|
19 |
JAVA_HOME=$(java-config --jdk-home) |
20 |
|
21 |
Not sure how you can make it select "any of the 1.4 vm that's installed" |
22 |
though... |
23 |
|
24 |
Also there's some way for packages installed with portage to specify |
25 |
what VM they need, but I dont know the details, maybe somebody else... |
26 |
|
27 |
Caster |
28 |
-- |
29 |
gentoo-java@g.o mailing list |