Summary: | Add support for Java 8 to Jasper | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | Konstantin Kolinko <knst.kolinko> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | shu.chen |
Priority: | P2 | ||
Version: | 8.0.3 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: |
2014-04-04_56283_tc6_v2.patch
Failing JSP (doesn't compile with a Java 8 JDK and source/target version 1.6) |
Description
Konstantin Kolinko
2014-03-19 12:30:55 UTC
This was implemented in Tomcat 8 by r1579174 and Tomcat 7 by r1579176 and will be in 8.0.4, 7.0.53. Proposed for Tomcat 6. Note 1. Technically CompilerOptions.VERSION_1_8 is a String constant "1.8", so it will be inlined at compile time. At runtime Tomcat/Jasper will be compatible with any other version of ECJ 4.3.x, e.g. 4.3.1. Note 2. All 547 classes in ecj-P20140317-1600.jar have format version 50.0 (Java 1.6). As such, this jar cannot be used to build Tomcat 6. For historical record, I applied the change to Tomcat 6 in r1584800 but had to revert it right away in r1584806. Created attachment 31476 [details]
2014-04-04_56283_tc6_v2.patch
Patch for Tomcat 6:
Add support for running Tomcat 6 with ecj-P20140317-1600.jar (as drop-in replacement for ecj-4.3.1.jar). Add support for value "1.8" for the compilerSourceVM and compilerTargetVM options.
Note that, per previous comments, ecj-P20140317-1600.jar can only be used when running with Java 6 or later. The "1.8" options make sense only when running with Java 8 (or later).
Patch applied to 6.0.x for 6.0.40 onwards. Created attachment 31624 [details] Failing JSP (doesn't compile with a Java 8 JDK and source/target version 1.6) The version of ECJ supplied with 7.0.53 fails to compile JSP files that reference class files containing default methods under the following conditions: - compilerSourceVersion/compilerTargetVersion < 1.8 - JRE_HOME >= jdk1.8.0 Attachment has a minimal test case It looks like it might be Eclipse bug 390889 which is fixed in 4.4M7 https://bugs.eclipse.org/bugs/show_bug.cgi?id=390889 Verified fixed when replacing ecj-P20140317-1600.jar with ecj-4.4M7.jar from http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/S-4.4M7-201405010200/ecj-4.4M7.jar (In reply to Robbie Gibson from comment #6) > Verified fixed when replacing ecj-P20140317-1600.jar with ecj-4.4M7.jar from > http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/ > S-4.4M7-201405010200/ecj-4.4M7.jar This is a separate issue and should be in a separate bugzilla entry. Done, sorry for the confusion. *** Bug 56613 has been marked as a duplicate of this bug. *** |