Gentoo Archives: gentoo-java

From: Stephan Palm <Stephan.Richard@×××.de>
To: gentoo-java@l.g.o
Subject: Re: [gentoo-java] Depending of tools.jar at runtime
Date: Mon, 08 Jan 2007 11:20:29
Message-Id: 200701081219.40699.Stephan.Richard@gmx.de
In Reply to: Re: [gentoo-java] Depending of tools.jar at runtime by Vlastimil Babka
1 Vlastimil Babka wrote:
2 > You can use "java-config --tools" to get the location (maybe we should
3 > do an eclass function for this). As for the classpath, it depends
4 > whether you are running "java", "javac", or some build.xml through ant.
5 > Java/javac have -cp option for this, ant will find and load tools.jar
6 > itself for its javadoc etc tasks, and if you want to use it in some task
7 > inside build.xml, there's usually classpath attribute of that task's
8 > element, or nested <classpath> element.
9
10 I actually need the tools.jar for the application at runtime. Using
11 the "java-config --tools" command, which you suggested, I now added the
12 following line to "src_install()":
13
14 java-pkg_addcp "\$(java-config --tools)"
15
16 The resulting package.env looks like this:
17 ...
18 CLASSPATH="...:$(java-config --tools)"
19 ...
20
21 But this way, I get the tools of the current default vm (It only works if the
22 default vm and the vm for the application is the same).
23
24 I think the idea of making an eclass function is good.
25 --
26 gentoo-java@g.o mailing list

Replies

Subject Author
Re: [gentoo-java] Depending of tools.jar at runtime Vlastimil Babka <caster@g.o>