Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 262602 - module-info.class: major version 53 is newer than 52...
module-info.class: major version 53 is newer than 52...
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Compiler
8.2
PC Linux
: P1 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
: JDK_9
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-28 13:05 UTC by Martin Balin
Modified: 2016-07-14 09:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Balin 2016-06-28 13:05:34 UTC
NB jdk9 branch using JDK 9 EA b 124 as Java Platform.
 
javac in jdk9 EA increased its class file major version to 53 while netbeans nbjavac is using 52. This causes warning in editor and exception when attemptint to run/debug such app.
Every module-info.java has this warning now:"module-info.class: major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded." 
Exception thrown when running such app on JDK 9 EA b 124 is:

Error occurred during initialization of VM
java.lang.module.ResolutionException: Error reading module: /home/mbalin/NetBeansProjects/JavaLibrary1/build/classes
	at java.lang.module.Resolver.findWithBeforeFinder(java.base@9-ea/Resolver.java:729)
	at java.lang.module.Resolver.resolveRequires(java.base@9-ea/Resolver.java:86)
	at java.lang.module.Configuration.resolveRequiresAndUses(java.base@9-ea/Configuration.java:370)
	at java.lang.module.ModuleDescriptor$1.resolveRequiresAndUses(java.base@9-ea/ModuleDescriptor.java:1986)
	at jdk.internal.module.ModuleBootstrap.boot(java.base@9-ea/ModuleBootstrap.java:263)
	at java.lang.System.initPhase2(java.base@9-ea/System.java:1928)
Caused by: java.lang.module.InvalidModuleDescriptorException: Must be >= 53.0
	at java.lang.module.ModuleInfo.invalidModuleDescriptor(java.base@9-ea/ModuleInfo.java:788)
	at java.lang.module.ModuleInfo.doRead(java.base@9-ea/ModuleInfo.java:157)
	at java.lang.module.ModuleInfo.read(java.base@9-ea/ModuleInfo.java:88)
	at java.lang.module.ModuleDescriptor.read(java.base@9-ea/ModuleDescriptor.java:1810)
	at java.lang.module.ModulePath.readExplodedModule(java.base@9-ea/ModulePath.java:577)
	at java.lang.module.ModulePath.readModule(java.base@9-ea/ModulePath.java:267)
	at java.lang.module.ModulePath.scan(java.base@9-ea/ModulePath.java:192)
	at java.lang.module.ModulePath.scanNextEntry(java.base@9-ea/ModulePath.java:144)
	at java.lang.module.ModulePath.find(java.base@9-ea/ModulePath.java:108)
	at java.lang.module.ModuleFinder$2.lambda$find$0(java.base@9-ea/ModuleFinder.java:359)
	at java.util.stream.ReferencePipeline$3$1.accept(java.base@9-ea/ReferencePipeline.java:195)
	at java.util.Spliterators$ArraySpliterator.tryAdvance(java.base@9-ea/Spliterators.java:958)
	at java.util.stream.ReferencePipeline.forEachWithCancel(java.base@9-ea/ReferencePipeline.java:127)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(java.base@9-ea/AbstractPipeline.java:502)
	at java.util.stream.AbstractPipeline.copyInto(java.base@9-ea/AbstractPipeline.java:488)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@9-ea/AbstractPipeline.java:474)
	at java.util.stream.FindOps$FindOp.evaluateSequential(java.base@9-ea/FindOps.java:152)
	at java.util.stream.AbstractPipeline.evaluate(java.base@9-ea/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(java.base@9-ea/ReferencePipeline.java:476)
	at java.lang.module.ModuleFinder$2.find(java.base@9-ea/ModuleFinder.java:361)
	at java.lang.module.Resolver.findWithBeforeFinder(java.base@9-ea/Resolver.java:726)
	at java.lang.module.Resolver.resolveRequires(java.base@9-ea/Resolver.java:86)
	at java.lang.module.Configuration.resolveRequiresAndUses(java.base@9-ea/Configuration.java:370)
	at java.lang.module.ModuleDescriptor$1.resolveRequiresAndUses(java.base@9-ea/ModuleDescriptor.java:1986)
	at jdk.internal.module.ModuleBootstrap.boot(java.base@9-ea/ModuleBootstrap.java:263)
	at java.lang.System.initPhase2(java.base@9-ea/System.java:1928)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo