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