[
https://issues.apache.org/jira/browse/NETBEANS-4892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211296#comment-17211296
]
Austin Stephens edited comment on NETBEANS-4892 at 10/9/20, 6:56 PM:
---------------------------------------------------------------------
Here is a possible workaround in launcher.sh, but it seems a bit hacky. We
might want a proper fix at some time?
{noformat}
@@ -310,6 +310,7 @@
formatVersion() {
formatted=`echo "$1" | sed
"s/-ea//g;s/-rc[0-9]*//g;s/-beta[0-9]*//g;s/-preview[0-9]*//g;s/-dp[0-9]*//g;s/-alpha[0-9]*//g;s/-fcs//g;s/_/./g;s/-/\./g"`
formatted=`echo "$formatted" | sed
"s/^\(\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\)\.b\([0-9][0-9]*\)/\1\.0\.\5/g"`
+ formatted=`echo "$formatted" | sed
"s/^\([0-9][0-9]*\)+\([0-9][0-9]*\)$/\1.0.\2/g"`
formatted=`echo "$formatted" | sed "s/\.b\([0-9][0-9]*\)/\.\1/g"`
echo "$formatted"
{noformat}
was (Author: sir intellegence):
Here is a possible workaround in launcher.sh, but it seems a bit hacky. We
might want a proper fix at some time?
@@ -310,6 +310,7 @@
formatVersion() {
formatted=`echo "$1" | sed
"s/-ea//g;s/-rc[0-9]*//g;s/-beta[0-9]*//g;s/-preview[0-9]*//g;s/-dp[0-9]*//g;s/-alpha[0-9]*//g;s/-fcs//g;s/_/./g;s/-/\./g"`
formatted=`echo "$formatted" | sed
"s/^\(\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\)\.b\([0-9][0-9]*\)/\1\.0\.\5/g"`
+ formatted=`echo "$formatted" | sed
"s/^\([0-9][0-9]*\)+\([0-9][0-9]*\)$/\1.0.\2/g"`
formatted=`echo "$formatted" | sed "s/\.b\([0-9][0-9]*\)/\.\1/g"`
echo "$formatted"
> Platform installer doesn't consider java 15 valid
> -------------------------------------------------
>
> Key: NETBEANS-4892
> URL: https://issues.apache.org/jira/browse/NETBEANS-4892
> Project: NetBeans
> Issue Type: Bug
> Components: platform - installer
> Affects Versions: Next, 12.0, 12.1
> Environment: Unix
> Windows?
> Reporter: Austin Stephens
> Priority: Major
>
> Apparently the method of formatting Java versions has changed at Java 15? I
> am using the AdoptOpenJdk version and it has gone from jdk-14.0.2+12 to
> jdk-15+32. As you could imagine, those two parse differently and
> `compareVersions` comes to the conclusion that "15+32" is less than 15.0.0
> (The expected version it generates for java 15). This results in any bundle
> java (or possibly any java in general, I haven't tested that yet) from
> passing the verification test and the installer will never find a java to use.
> The best work around I can currently think of (other than building your own
> copy of Java 15) is to use Java <=14, which may significantly complicate the
> building process...
> For reference, an easy way to possibly test if your solution fixed the
> problem is to source nbi/engine/native/launcher/unix/src/launcher.sh and run
> `compareVersions 15+36 15.0.0`
> This bug may also happen on windows, but I haven't checked since the
> installer is a bit more complicated on windows...
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists