2
votes

I'm seeing the following error message, I would like to know what is the minimum JDK version required for cn1lib to work. I have searched in the forum to see what is the minimum version and could not find correct reference. Please advise.

Cannot use a cn1lib with java version greater then the project java version at com.codename1.build.client.InstallLibsTask.mergeRequiredProperties(InstallLibsTask.java:227) at com.codename1.build.client.InstallLibsTask.unzip(InstallLibsTask.java:97) at com.codename1.build.client.InstallLibsTask.execute(InstallLibsTask.java:82) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1248) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

1
It's unrelated to the JDK it's related to the project version. If you have an old project it might be a Java 5 project which you could migrate to Java 8. If you specify which cn1lib and what you have in codenameone_settings.properties I could help more - Shai Almog
Shai..I found this is due to codenameone_settings file got corrupted. This happens sometimes without any reason. I haven't done any changes recently. Is there something I should be careful about. - Vinod
What do you mean by "corrupted"? - Shai Almog
All or some of the build hints and configurations from the file will disappear. Please advise - Vinod
That is odd. Is this something that you can reproduce? Did it happen after you did something? - Shai Almog

1 Answers

0
votes

This is due to the NativeLogReader cn1lib which defined codename1.arg.java.version=8 which might conflict with valid Java 8 projects.

I've created this pull request to fix that: https://github.com/jsfan3/CN1Libs-NativeLogsReader/pull/1 once it's done the author would need to submit an update and you'd need to update the cn1lib from the extension manager.