Move to use JDK 8 as the build JDK #959
Comments
For the curious, this is only error when building against Java 8:
|
I thought the JDK was supposed to support building for older versions. I see the build.bnd has: javac.source: 1.6 I'm curious why this doesn't work. |
Me too. Which is why we have this issue :-) I am concerned there may be some type accessibility issue in the older version of Eclipse (3.7.2) we target for bndtools. Moving to a more recent version of Eclipse might be the solution. |
Solves compilation errors mentioned in bndtools#959 The `classycle` task fails when compiled with Java 8. Some code compiled with Java 7 passes classcyle, so perhaps this is a classycle bug? Use `gradle -x classycle` to build with Java 8. Signed-off-by: BJ Hargrave <bj@bjhargrave.com>
I fixed the compilation errors with Java 8. However with java 8 the |
Classycle is broken on Java 8 class files just like bnd was by the addition of compile-time constant entries in the constant pool. See http://blog.bjhargrave.com/2014/04/java-8-bnd-and-references-to-compile.html. I verified that when bndtools is built with JDK 7, the classycle check will pass when run on JDK 7 or 8 and also that when bndtools is built with JDK 8, the classycle check will fail when run on JDK 7 or 8. So this indicates that the issue is in the generated class files which is why I believe that the compile-time constants in the constant pool is causing classycle to report a false positive. I sent an email to the classycle developer to inquire about a possible fix for classycle. If we cannot get a fix, we wont be able to use classycle when we move to build with JDK 8. |
It is broken when compiling with JDK 8. See bndtools#959 (comment) If we need any checks, @pkriens suggests we enhance bnd to make the desired checks since it already parses the class files. Signed-off-by: BJ Hargrave <bj@bjhargrave.com>
We currently build bndtools with JDK 7. See the .travis.yml file for example. When building with JDK 8, there are some warnings and one compiler error. These need to be fixed so was can change .travis.yml and cloudbees to build bndtools with JDK 8.
The text was updated successfully, but these errors were encountered: