rhino and java compiler

41 views
Skip to first unread message

Marcelo d'Amorim

unread,
Jan 13, 2009, 2:02:11 PM1/13/09
to iBugs, damorim...@cin.ufpe.br
i am having trouble to build rhino. i believe the problem is related
to the java compiler version.

i changed the JAVA_HOME in properties.xml and could checkout one
version of rhino (159334).

this is the message i get when i tried to build (used:"ant
buildversion -DfixId=159334 -Dtag=post-fix"):

==========================================
compile:
[javac] Compiling 109 source files to /home/damorim/tmp/
ibugs_rhino-0.1/versions/159334/post-fix/mozilla/js/rhino/build/c\
lasses
[javac] /home/damorim/tmp/ibugs_rhino-0.1/versions/159334/post-fix/
mozilla/js/rhino/src/org/mozilla/javascript/ScriptRunt\
ime.java:1158: as of release 5, 'enum' is a keyword, and may not be
used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] IdEnumeration enum = (IdEnumeration)enumObj;
[javac] ^
[javac] /home/damorim/tmp/ibugs_rhino-0.1/versions/159334/post-fix/
mozilla/js/rhino/src/org/mozilla/javascript/ScriptRunt\
ime.java:1159: as of release 5, 'enum' is a keyword, and may not be
used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] return enum.nextId();
[javac] ^
[javac] 2 errors
==========================================

i guess it is important to mention that i use java 1.6. ('javac -
version' gives me "java version 1.6.0_07".) i thought the JAVA_HOME
setup should be sufficient as that worked for aspectj? if not, please
let me know what other configuration i should make. (maybe set up the
jdk of my entire system to 1.4?)

thanks, marcelo.

just for the record. after the problem above, i tried to configure
the build.xml files under version 159334 to use java source 1.4 (added
key value source="1.4" on javac commands.). but then i got another
error. (see below.) believe that it relates to library version
incompatibility.

==========================================
compile:
[javac] Compiling 3 source files to /home/damorim/tmp/
ibugs_rhino-0.1/versions/159334/post-fix/mozilla/js/rhino/build/
classes
[javac] /home/damorim/tmp/ibugs_rhino-0.1/versions/159334/post-fix/
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/
JavaPolicySecurity.java:115: reference to CodeSource is ambiguous,
both method CodeSource(java.net.URL,java.security.cert.Certificate[])
in java.security.CodeSource and method CodeSource
(java.net.URL,java.security.CodeSigner[]) in java.security.CodeSource
match
[javac] new CodeSource(null, null);
[javac] ^
[javac] /home/damorim/tmp/ibugs_rhino-0.1/versions/159334/post-fix/
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/
JavaPolicySecurity.java:158: reference to CodeSource is ambiguous,
both method CodeSource(java.net.URL,java.security.cert.Certificate[])
in java.security.CodeSource and method CodeSource
(java.net.URL,java.security.CodeSigner[]) in java.security.CodeSource
match
[javac] CodeSource cs = new CodeSource(url, null);
[javac] ^
[javac] 2 errors
==========================================

Valentin Dallmeier

unread,
Jan 14, 2009, 4:09:16 AM1/14/09
to ib...@googlegroups.com
Hello Marcelo!

Thank you for trying iBUGS and I'm sorry that you're running into
problems. As you've already guessed, this is an issue with the Rhino
project not passing the java compiler to all stages of the build. The
solution is to actually make your JAVA_HOME and PATH variable point to
a JDK version 1.4. There is also an entry in the FAQ that mentions
this issue and the solution. Please try building Rhino again with the
variables set as described above.

Please let me know if you have any more issues!

Valentin
Reply all
Reply to author
Forward
0 new messages