Gentoo Archives: gentoo-java

From: "William L. Thomson Jr." <wltjr@g.o>
To: "Sven Köhler" <skoehler@×××.de>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] JDK used for compiling
Date: Sun, 18 Nov 2007 17:41:50
Message-Id: 1195407665.23039.26.camel@wlt.obsidian-studios.com
In Reply to: [gentoo-java] JDK used for compiling by "Sven Köhler"
1 On Sun, 2007-11-18 at 16:37 +0100, Sven Köhler wrote:
2 > Hi,
3 >
4 > if multiple JDKs are installed, which one is used for compiling
5 > packages? And why have you chosen that strategy?
6
7 In short build vm != system vm. That allows for the two to differ and
8 further choice/control.
9
10 > I was conviced, that ebuilds always use the lowest JDK version possible.
11 > But it seems, that packages use the System VM - which is 1.6 in my case.
12 > But 1.5 is also installed.
13
14 Ebuilds compile source/target based on the lowest JDK version specified
15 in the ebuild. Which vm is used is controlled by by the ebuild and/or
16 the env. But most times that's restricted just to a version that
17 satisfied a virtual. Not specific vms.
18
19 > So i like the idea, that, once i have troubles with 1.6, i may switch
20 > back to 1.5. But, there is a fair chance, that packages compiled with
21 > 1.6 doen't work with 1.5. And no: using "-target 1.5" is NOT sufficiant
22 > due to overloading.
23
24 You can switch back and forth with no problems. That's why we compile to
25 lowest possible source/target. If a package requires a certain version
26 or fails with another. It's deps will reflect that.
27
28 > So which JDK version is actually used by daemons?
29
30 System vm unless specified otherwise. Like could be done for Tomcat
31 in /etc/conf.d/tomcat. Which would only effect that one
32 service/application and not the entire system.
33
34 > Is it the system-VM
35 > too? So how can i run my daemon with JDK 1.6 while compiling things
36 > against JDK 1.5?
37
38 If you want control over building you can edit the files
39 in /etc/java-config-2/build/{jdk,compilers}.conf
40
41 http://www.gentoo.org/doc/en/java.xml#doc_chap4
42
43 It can also be overridden via command line
44 http://www.gentoo.org/proj/en/java/java-devel.xml#doc_chap7
45
46
47 --
48 William L. Thomson Jr.
49 Gentoo/Java

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-java] Re: JDK used for compiling "Sven Köhler" <skoehler@×××.de>