public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-java] specifying jvm in scripts?
@ 2006-07-03  8:26 Roy Wright
  2006-07-03  8:40 ` Caster
  0 siblings, 1 reply; 2+ messages in thread
From: Roy Wright @ 2006-07-03  8:26 UTC (permalink / raw
  To: gentoo-java

Howdy,

Just upgraded to the new java system, no problems.  THANK YOU for all 
the hard work!

I have several java programs that I launch via scripts.  Some are 1.4, 
some are 1.5.
Just curious if there is a method to select the jvm from within the 
script independent
of the system or user jvm?  Something like:

  JAVACMD = `java-config --java 1.4`

TIA,
Roy

-- 
gentoo-java@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-java] specifying jvm in scripts?
  2006-07-03  8:26 [gentoo-java] specifying jvm in scripts? Roy Wright
@ 2006-07-03  8:40 ` Caster
  0 siblings, 0 replies; 2+ messages in thread
From: Caster @ 2006-07-03  8:40 UTC (permalink / raw
  To: gentoo-java

Roy Wright wrote:
> I have several java programs that I launch via scripts.  Some are 1.4,
> some are 1.5.
> Just curious if there is a method to select the jvm from within the
> script independent
> of the system or user jvm?  Something like:
> 
>  JAVACMD = `java-config --java 1.4`

Yes, with GENTOO_VM and VMHANDLE of the jvm you want, like

GENTOO_VM="sun-jdk-1.5"

This will make all the wrapper scripts for java, javac, etc. call the
binaries from selected VM.
If your program also relies on JAVA_HOME, you can add this after the
GENTOO_VM line:

JAVA_HOME=$(java-config --jdk-home)

Not sure how you can make it select "any of the 1.4 vm that's installed"
though...

Also there's some way for packages installed with portage to specify
what VM they need, but I dont know the details, maybe somebody else...

Caster
-- 
gentoo-java@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-03  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-03  8:26 [gentoo-java] specifying jvm in scripts? Roy Wright
2006-07-03  8:40 ` Caster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox