1 |
On Saturday 13 May 2006 00:10, "wu chuanwen" <wcw8410@×××××.com> wrote |
2 |
about '[gentoo-user] cause jdk1.5 emerge tomcat error!': |
3 |
> I have emerge sun-jdk1.5.**(i download it and ebuild it by |
4 |
> myself).Now, i want to emerge tomcat,and it is dependent of |
5 |
> dev-java/commons-daemon-1.0.1 .But when i emerge it,errors just occur: |
6 |
> |
7 |
> "enum" in jdk1.5 is a keyword,but it is used as a variable in |
8 |
> the dev-java/commons-daemon-1.0.1. |
9 |
> |
10 |
> So now is there anyway to emerge tomcat? |
11 |
|
12 |
Change your system javac to a 1.4 for the emerge of commons-daemon. The |
13 |
resulting class/jar files will run in a 1.5 vm -- since enum and assert |
14 |
(introduced in 1.4) are both still valid identifiers in bytecode under a |
15 |
1.5 vm. |
16 |
|
17 |
Bytecode also allows two methods with the same name that only differ in |
18 |
return type, which allows generics that only compile under 1.5 (and |
19 |
modified versions of 1.4) javac to work under a vm as far back as (at |
20 |
least) 1.2 -- as long as the requisite libraries are in place. |
21 |
|
22 |
Sun and the JCP have been very good to modify the bytecode specification |
23 |
sparingly, if at all, so that valid class files output from any javac will |
24 |
run on almost all vms. This common binary format goes a long way toward |
25 |
the goal of WORA. |
26 |
|
27 |
-- |
28 |
"If there's one thing we've established over the years, |
29 |
it's that the vast majority of our users don't have the slightest |
30 |
clue what's best for them in terms of package stability." |
31 |
-- Gentoo Developer Ciaran McCreesh |