Using Eclipse compiler standalone with Java 11? [message #1797805] |
Tue, 06 November 2018 10:09  |
Eclipse User |
|
|
|
Hi,
I'm experimenting with building a Java8-project with Java 11 and I managed to get it to work inside Eclipse by installing the JDT BETA_JAVA11 plugin .
I also need to build the project outside eclipse with ECJ, but so far no luck.
I'm guessing that I can download org.eclipse.jdt.core-3.15.100.v20180928-0501_BETA_JAVA11.jar and use that inside my ant/gradle build file to access the compiler (?)
I've already tried the standalone distribution of ecj-4.9 and ecj-4.10M1 with no success and suspect that those two don't have the required support.
This could very well be a problem on my end, but before I spend too much time on it, could anyone tell me if either of these should work.
Or should I just wait for the Eclipse 4.10 released before trying to do this?
TIA,
Chris
|
|
|
|
|
Re: Using Eclipse compiler standalone with Java 11? [message #1797847 is a reply to message #1797832] |
Wed, 07 November 2018 07:07   |
Eclipse User |
|
|
|
Hi again,
after some more work, I'm starting to lean towards there being something wrong with ECJ after all, or maybe just a lack of error handling. I can run my gradle build with javac without issues, but when I switch over to the ECJbuild, I can trigger two different nullpointers from the compiler, depending on how I call it.
attempt 1:
----------
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMemberType(ParameterizedTypeBinding.java:797)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findMemberType(Scope.java:1544)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMemberType(Scope.java:2903)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.findNextTypeBinding(QualifiedTypeReference.java:53)
<...>
----
attempt 2
----
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:73)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.combine(LookupEnvironment.java:355)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:345)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:112)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:231)
<...>
----
I tried to extract the command that gradle will run and I can repeat the issue with a commandline call of ecj.
I'm not ruling out that there's something seriously wrong with my setting of the paths, but I shouldn't be seeing a these exceptions even if I feed garbage to ECJ, right?
I can try to provide more detailed information on what parameters I used if it is any help, but unfortunately I can't show how to repeat it since it is company-internal code.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05645 seconds