You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/09 09:46:55 UTC

[GitHub] [netbeans] epliskin opened a new issue, #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows

epliskin opened a new issue, #5252:
URL: https://github.com/apache/netbeans/issues/5252

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   After upgrading the Gradle plugin to the latest version today I could not open my Gradle project running NetBeans on Java 17 on Windows. The following error message appears:
   
   `java.lang.StringIndexOutOfBoundsException: begin 1, end -1, length 4
   	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4601)
   	at java.base/java.lang.String.substring(String.java:2704)
   	at org.netbeans.modules.gradle.GradleJavaCompatProblemsProvider.getJavaMajorVersion(GradleJavaCompatProblemsProvider.java:147)
   	at org.netbeans.modules.gradle.GradleJavaCompatProblemsProvider.getJavaVersion(GradleJavaCompatProblemsProvider.java:128)
   	at org.netbeans.modules.gradle.GradleJavaCompatProblemsProvider.getProblems(GradleJavaCompatProblemsProvider.java:91)
   	at org.netbeans.spi.project.ui.support.UILookupMergerSupport$ProjectProblemsProviderImpl.getProblems(UILookupMergerSupport.java:274)
   	at org.netbeans.api.project.ui.ProjectProblems.isBroken(ProjectProblems.java:58)
   	at org.netbeans.modules.gradle.NbGradleProjectImpl$ProjectOpenedHookImpl.lambda$projectOpened$0(NbGradleProjectImpl.java:689)
   	at org.netbeans.modules.gradle.NbGradleProjectImpl$ProjectOpenedHookImpl.projectOpened(NbGradleProjectImpl.java:696)
   	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
   	at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:219)
   	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
   [catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1321)
   	at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1402)
   	at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:848)
   	at org.netbeans.modules.project.ui.OpenProjectList$6.run(OpenProjectList.java:672)
   	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)
   	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   `
   
   After changing a line in the netbeans.conf file from 
   `netbeans_jdkhome="C:\Program Files\Java\jdk-17"
   `
   to 
   `netbeans_jdkhome="C:\Program Files\Java\jdk-18.0.1.1"
   `
   I could open the Gradle project as usual.
   
   
   ### How to reproduce
   
   _No response_
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   17 OpenJDK
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on issue #5252:
URL: https://github.com/apache/netbeans/issues/5252#issuecomment-1377735710

   Could you attach the `C:\Program Files\Java\jdk-17\release` file?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] epliskin commented on issue #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows

Posted by GitBox <gi...@apache.org>.
epliskin commented on issue #5252:
URL: https://github.com/apache/netbeans/issues/5252#issuecomment-1378238564

   C:\Program Files\Java\jdk-17\release
   [release.txt](https://github.com/apache/netbeans/files/10388970/release.txt)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on issue #5252:
URL: https://github.com/apache/netbeans/issues/5252#issuecomment-1378330120

   Oh, no dots in the Java Version! What an oversight from me!
   
   The fix is simple, if you would like to use Java 17, install something more recent. it will have `"17.0.x"` in `JAVA_VERSION`, so it would work.  Will be fixed in NB17.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi closed issue #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows

Posted by GitBox <gi...@apache.org>.
lkishalmi closed issue #5252: Latest upgrade of Gradle plugin fails to open project with Java 17 in Windows
URL: https://github.com/apache/netbeans/issues/5252


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists