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 2019/01/31 20:40:44 UTC

[GitHub] jlahoda opened a new pull request #1111: Using java.specification.version to read the version of the JDK.

jlahoda opened a new pull request #1111: Using java.specification.version to read the version of the JDK.
URL: https://github.com/apache/incubator-netbeans/pull/1111
 
 
   GradleDistributionManager.java is using System.getProperty("java.version") to detect JDK version, but that property may be e.g. "13-internal", and then Integer.parseInt throws an exception.
   
   I'd like to propose to use java.specification.version, which should be an easier to handle number:
   jshell> System.getProperty("java.version")
   $1 ==> "13-internal"
   
   jshell> System.getProperty("java.specification.version")
   $2 ==> "13"
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
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