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 |