I’m seeing the following error after upgrading the project to JDK 11. I have updated the CN1 Libraries from Extension Manager already and codename settings (codename1.arg.java.version=11) file with JDK. Please advise how did you resolve the following error –
*Property codename1.arg.java.version has a conflict.
at com.codename1.build.client.InstallLibsTask.mergeRequiredProperties(InstallLibsTask.java:253)
at com.codename1.build.client.InstallLibsTask.unzip(InstallLibsTask.java:103)
at com.codename1.build.client.InstallLibsTask.execute(InstallLibsTask.java:88)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at jdk.internal.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
atjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
at org.netbeans.core.execution.RunClassThread.run*
You can’t change java.version
to 11. It has to remain on 8 even if you’re using JDK 11. It indicates the language level supported by the compiler and is fixed at 8.
Edit codenameone_settings.properties
and change the entry:
codename1.arg.java.version=11
Back to:
codename1.arg.java.version=8