|Re: [tycho-user] Compiling for different Java versions with Maven|
Hi Mickael,This is all new and confusing to me so I'm learning as I go along. I'll describe what I observe, not knowing what is relevant...What do you mean by "the build was compiled for JavaSE-11 ? Aren't the class files not using the Java 1.8 class version?This was on the Jenkins build running a Docker image. I do not know how to tell if the class files are compiled for 1.8 or 11 from the tycho-compiler-plugin on the remote machine.
I had based myself on the fact that the log showed the test running with java.version=11.0.2 and the exception stack traces show "at java.base/java.lang.*" instead of "at java.lang.*". But I guess the test can run with JavaSE-11 even if classes are compiled for JavaSE-1.8, right?I tried it locally from the command-line mvn and using 'javap -verbose' I can see that the class files are indeed version 52 (JavaSE-1.8).
However, a better and more portable approach (with PDE) is to override the source/target levels in build.properties.I'm not sure what that means. Is it each plug-in's build.properties file (we have 125 plug-ins)? What property would we need to set and how would we dynamically set it from the Jenkins/mvn parameters?
Back to the top