我的 Java 版本 17.0.2;Java HotSpot(TM) 64 位服务器 VM 17.0.2+8-LTS-86。在 NetBeans12.6 中出现意外异常无法调用 java.nio.file.path.startswith(java.nio.file.path) 因为路径为空。在运行项目本身之前收到此错误详细异常:
Cannot invoke "java.nio.file.Path.startsWith(java.nio.file.Path)" because "path" is null
at org.netbeans.modules.gradle.GradleModuleFileCache21$CachedArtifactVersion.<init>(GradleModuleFileCache21.java:143)
at org.netbeans.modules.gradle.GradleModuleFileCache21.resolveCachedArtifactVersion(GradleModuleFileCache21.java:225)
at org.netbeans.modules.gradle.api.GradleProjects.getJavadoc(GradleProjects.java:74)
at org.netbeans.modules.gradle.java.queries.GradleSourceForRepository.findJavadoc(GradleSourceForRepository.java:83)
at org.netbeans.api.java.queries.JavadocForBinaryQuery.findJavadoc(JavadocForBinaryQuery.java:62)
at org.netbeans.modules.javadoc.search.JavadocRegistry.readRoots(JavadocRegistry.java:153)
at org.netbeans.modules.javadoc.search.JavadocRegistry.getDocRoots(JavadocRegistry.java:106)
at org.netbeans.modules.javadoc.search.IndexBuilder.refreshIndex(IndexBuilder.java:159)
at org.netbeans.modules.javadoc.search.IndexBuilder.run(IndexBuilder.java:105)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)