Reputation: 23
I'm working with Eclipse Oxygen and trying to change my sourceLevel to 1.8. Every time I try to Run my program, I receive the following Console output:
Runing CodeServer with parameters: [-noprecompile, -port, 54953, -
sourceLevel, 1.7, -bindAddress, 127.0.0.1, -launcherDir,
C:\Users\heyerj\eclipse-workspace\Zoo\war, -logLevel, INFO, com.zoo.gxt.project.Zoo]
Super Dev Mode starting up
workDir: C:\Users\heyerj\AppData\Local\Temp\gwt-codeserver-4320248131930738092.tmp
Loading Java files in com.zoo.gxt.project.Zoo.
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Finding entry point classes
Tracing compile failure path for type 'com.zoo.gxt.project.client.Zoo'
[ERROR] Errors in 'file:/C:/Users/heyerj/eclipse-
workspace/Zoo/src/com/zoo/gxt/project/client/Zoo.java'
[ERROR] Line 215: Lambda expressions are allowed only at source level 1.8 or above
[ERROR] Line 223: Lambda expressions are allowed only at source level 1.8 or above
[ERROR] Line 247: Lambda expressions are allowed only at source level 1.8 or above
[ERROR] Hint: Check the inheritance chain from your module; it may not be
inheriting a required module or a module may not be adding its source path
entries properly
I've checked the Poperties > Java Compiler and it's set to use JavaSE-1.8 on the Java Build Path. The Java Build Path has a JRE System Library that points to JavaSE-1.8(Eclipse).
In Window > Preferences, the compiler compliance level is also set to 1.8. All my necessary Run Configurations have their JRE Execution Environments set to JavaSE-1.8(Eclipse). My eclipse.ini file shows that is should be launching in Java 1.8.
Finally, I have also tried deleting the gwt-unitCache and deleting the Project (but not all the files) and re-importing it. What am I missing?
Upvotes: 0
Views: 191
Reputation: 1611
In your output it has: sourceLevel, 1.7
.
This needs to be 1.8.
Take a look at the GWT Development Mode run configuration for your project. In the JRE section, see what the Runtime JRE is set to.
Another thing, are you using the GWT 2.8 SDK? You need GWT 2.8 to use Java 8 language features such as lambdas. Look in:
project properties > GWT > General Settings > GWT SDK
Upvotes: 3