Gentoo Archives: gentoo-java

From: Vlastimil Babka <caster@g.o>
To: gentoo-java <gentoo-java@l.g.o>
Subject: Re: [gentoo-java] Depending of tools.jar at runtime
Date: Mon, 08 Jan 2007 11:50:38
Message-Id: 45A22FAC.9000602@gentoo.org
In Reply to: Re: [gentoo-java] Depending of tools.jar at runtime by Stephan Palm
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Stephan Palm wrote:
5 > I actually need the tools.jar for the application at runtime. Using
6 > the "java-config --tools" command, which you suggested, I now added the
7 > following line to "src_install()":
8 >
9 > java-pkg_addcp "\$(java-config --tools)"
10 >
11 > The resulting package.env looks like this:
12 > ...
13 > CLASSPATH="...:$(java-config --tools)"
14 > ...
15 >
16 > But this way, I get the tools of the current default vm (It only works if the
17 > default vm and the vm for the application is the same).
18
19 Yep, this is far from ideal. This would probably need some specific
20 variable in package.env that would tell gjl launcher to grab tools.jar
21 for you. For now you can probably set CLASSPATH="$(java-config --tools)"
22 in launcher script via java-pkg_dolauncher --pre. But this will also
23 require you to have deafult vm set to JDK (only them contain tools.jar)
24 capable of runing the app, because it's evaluated before the gjl
25 launcher selects proper VM.
26
27 > I think the idea of making an eclass function is good.
28
29 As a wrapper for java-config --tools in ebuilds yes, but here it won't
30 help and we should probably extend package.env and java-config...
31 - --
32 Vlastimil Babka (Caster)
33 Gentoo/Java
34 -----BEGIN PGP SIGNATURE-----
35 Version: GnuPG v1.4.6 (GNU/Linux)
36 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
37
38 iD8DBQFFoi+rtbrAj05h3oQRAi3UAJ9E+3pXKkVHMcH+Jh82o0xjYWc2HACaApm9
39 4aRktWmru8aVHjW55UGvnMY=
40 =38qB
41 -----END PGP SIGNATURE-----
42 --
43 gentoo-java@g.o mailing list