You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Michael Huang <Mi...@spisim.com> on 2019/01/05 19:26:02 UTC

[NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Hi,

  I think there is a bug in nbi's JavaUtils.c, line 125
(Function getJavaVersionFromString), when it's used to unpack JVM of
version 10 or above such as OpenJDK11. This will affect netbeans launcher
on windows (nlw.exe) and thus need to have it rebuild after code fix.

  The current codes' assumption is that Java version (java -version) show
MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes use
string[1] to check "." first. For OpenJDK11, the java -version will show
11.X... and thus the dot "." will not appear at the string[1]. As a result,
result code of "ERROR_OK" will not be assigned and JVM unpacking will fail.

  I have never committed codes to netbeans myself and thus will leave this
for someone more familiar with the code committing process to review first
and then commit if necessary. Hope this will help those whom may need
NetBeans launcher to unpack JVM during installation process on windows.

  Thanks and regards,

MH
-----------------------------------------------
SPISim:  [www.spisim.com]
EDA in Signal, Power Integrity and SIMulation
-----------------------------------------------

Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Emilian Bold <em...@gmail.com>.
First you would have to make a PR for the source changes. Since you
seem to need to manually change some configuration, that belongs in
the Makefile.

Once the Makefile is ready and we all can create the exe we'll just
add an external binary link for the exe. (The exe will not be added
again in that folder, sadly, as per Apache policy).

--emi

http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!

On Sun, Jan 6, 2019 at 10:47 PM Andreas Hauffe
<an...@tu-dresden.de> wrote:
>
> Hi,
>
> I build a new nlw.exe with regards to
> http://wiki.netbeans.org/LauncherBuild and little changes.
>
> I followed the steps:
>
> 1. Download and install Cygwin on a Windows machine (with the latest
> version of gcc-core, gcc-g++, mingw64-x86_64-gcc-core,
> mingw64-x86_64-gcc-g++, gdb, make [I don't know if gcc-core, gcc-g++ is
> really needed])
> 2. Download Netbeans 8.2 as C/C++ Zip version
> (https://download.netbeans.org/netbeans/8.2/final/zip/netbeans-8.2-201609300101-cpp.zip)
> 3. Run Netbeans 8.2 and update all modules
> 4. Clone the Apache Netbeans git repository (git clone
> https://github.com/apache/incubator-netbeans.git)
> 5. Switch to release10 branch (git checkout release100)
> 6. Open the Netbeans C/C++ project
> (incubator-netbeans/nbi/engine/native/launcher/windows)
> 7. Create a new Netbeans C/C++ configuration "Cygwin64" (Tools ->
> Options -> C/C++)
>     Add C:\cygwin64\bin\x86_64-w64-mingw32-gcc.exe as C compiler and
> C:\cygwin64\bin\x86_64-w64-mingw32-g++.exe as C++ compiler
> 8. Change the project properties of "NBI Native Launcher" project
>     Remove "-mno-cygwin" from "Build->C-Compiler->Additional Options"
> and "Build->Linker->Additional Options"
> 9. Clean and Build the project
> 10. The nlw.exe is in the folder
> incubator-netbeans\nbi\engine\native\launcher\windows\dist\nlw.exe
>
> Hint: Do compile with the with configuration "Debug". The options are
> only added here, especially the needed libraries. In my opinion there
> are no real debug compiler options set in the "Debug" configuration. The
> Release configuration is not set up.
>
> Does someone see something missing or incorrect?
>
> What to do with the nlw.exe? Pull request?
>
> Andreas
>
>
> Am 05.01.19 um 21:27 schrieb Emilian Bold:
> > PS: I case somebody reads the thread, we used to have a nlw exe here
> > https://github.com/emilianbold/netbeans-releases/tree/master/nbi/engine/native/launcher/windows/dist
> >
> > --emi
> >
> > http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
> >
> > On Sat, Jan 5, 2019 at 10:10 PM Emilian Bold <em...@gmail.com> wrote:
> >> If you get it working do come back and contribute. We did recompile
> >> the netbeans.exe launchers for NetBeans 9 (and we are reusing them for
> >> NetBeans 10 too), but I don't remember a discussion about some other
> >> exe to recompile.
> >>
> >> Note that the NetBeans installer is just being donated (there's a PR
> >> about it on GitHub) but I see that nbi has been donated since the
> >> start. So... just to be safe I reopened
> >> https://issues.apache.org/jira/browse/NETBEANS-1157 , perhaps there's
> >> something missing.
> >>
> >> --emi
> >>
> >> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
> >>
> >> On Sat, Jan 5, 2019 at 9:55 PM Michael Huang <Mi...@spisim.com> wrote:
> >>> Hi,
> >>>
> >>>    Thanks for the update.
> >>>
> >>>    Yes, I think that may be the case (it was not recompiled). I didn't find
> >>> nlw.exe from the Netbeans10 source and now I remember that I populated that
> >>> from Netbeans 9.0.... including the problematic source. It's good that it's
> >>> now fixed.
> >>>
> >>>    I will try to find recompiled nlw.exe as I'm having trouble recompiling a
> >>> working one using VisualStudio 2017 (the project was using Visual Studio
> >>> 2005).
> >>>
> >>> Regards,
> >>>
> >>> MH
> >>> -----------------------------------------------
> >>> SPISim:  [www.spisim.com]
> >>> EDA in Signal, Power Integrity and SIMulation
> >>> -----------------------------------------------
> >>>
> >>>
> >>> On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:
> >>>
> >>>> Maybe we are looking at different versions of JavaUtils.c but to me it
> >>>> looks like it has a small parser and it expressly supports major
> >>>> versions with more digits:
> >>>>
> >>>> https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
> >>>>
> >>>> This has been fixed since  Aug 21st by Andreas Hauffe in
> >>>> NETBEANS-1157, see
> >>>>
> >>>> https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
> >>>>
> >>>> So you are saying the exe file from NetBeans 10 is not good? Maybe we
> >>>> never recompiled it?
> >>>>
> >>>> --emi
> >>>>
> >>>> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
> >>>>
> >>>> On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
> >>>> wrote:
> >>>>> Hi,
> >>>>>
> >>>>>    I think there is a bug in nbi's JavaUtils.c, line 125
> >>>>> (Function getJavaVersionFromString), when it's used to unpack JVM of
> >>>>> version 10 or above such as OpenJDK11. This will affect netbeans launcher
> >>>>> on windows (nlw.exe) and thus need to have it rebuild after code fix.
> >>>>>
> >>>>>    The current codes' assumption is that Java version (java -version) show
> >>>>> MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
> >>>> use
> >>>>> string[1] to check "." first. For OpenJDK11, the java -version will show
> >>>>> 11.X... and thus the dot "." will not appear at the string[1]. As a
> >>>> result,
> >>>>> result code of "ERROR_OK" will not be assigned and JVM unpacking will
> >>>> fail.
> >>>>>    I have never committed codes to netbeans myself and thus will leave
> >>>> this
> >>>>> for someone more familiar with the code committing process to review
> >>>> first
> >>>>> and then commit if necessary. Hope this will help those whom may need
> >>>>> NetBeans launcher to unpack JVM during installation process on windows.
> >>>>>
> >>>>>    Thanks and regards,
> >>>>>
> >>>>> MH
> >>>>> -----------------------------------------------
> >>>>> SPISim:  [www.spisim.com]
> >>>>> EDA in Signal, Power Integrity and SIMulation
> >>>>> -----------------------------------------------
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> >>>> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> >>>>
> >>>> For further information about the NetBeans mailing lists, visit:
> >>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>>>
> >>>>
> >>>>
> >>>>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> > For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> --
> Viele Grüße
> Andreas Hauffe
> Leiter des Forschungsfeldes "Auslegungsmethoden für Luftfahrzeuge"
>
> ----------------------------------------------------------------------------------------------------
> Technische Universität Dresden
> Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering
> Lehrstuhl für Luftfahrzeugtechnik / Chair of Aircraft Engineering
>
> D-01062 Dresden
> Germany
>
> phone : +49 (351) 463 38496
> fax :  +49 (351) 463 37263
> mail : andreas.hauffe@tu-dresden.de
> Website : http://tu-dresden.de/mw/ilr/lft
> ----------------------------------------------------------------------------------------------------
> Do you know our free laminate analysis code eLamX²? If not, please visit the following web address:
> http://www.elamx.de
>
>

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

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




Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Andreas Hauffe <an...@tu-dresden.de>.
Hi,

I build a new nlw.exe with regards to 
http://wiki.netbeans.org/LauncherBuild and little changes.

I followed the steps:

1. Download and install Cygwin on a Windows machine (with the latest 
version of gcc-core, gcc-g++, mingw64-x86_64-gcc-core, 
mingw64-x86_64-gcc-g++, gdb, make [I don't know if gcc-core, gcc-g++ is 
really needed])
2. Download Netbeans 8.2 as C/C++ Zip version 
(https://download.netbeans.org/netbeans/8.2/final/zip/netbeans-8.2-201609300101-cpp.zip)
3. Run Netbeans 8.2 and update all modules
4. Clone the Apache Netbeans git repository (git clone 
https://github.com/apache/incubator-netbeans.git)
5. Switch to release10 branch (git checkout release100)
6. Open the Netbeans C/C++ project 
(incubator-netbeans/nbi/engine/native/launcher/windows)
7. Create a new Netbeans C/C++ configuration "Cygwin64" (Tools -> 
Options -> C/C++)
    Add C:\cygwin64\bin\x86_64-w64-mingw32-gcc.exe as C compiler and 
C:\cygwin64\bin\x86_64-w64-mingw32-g++.exe as C++ compiler
8. Change the project properties of "NBI Native Launcher" project
    Remove "-mno-cygwin" from "Build->C-Compiler->Additional Options" 
and "Build->Linker->Additional Options"
9. Clean and Build the project
10. The nlw.exe is in the folder 
incubator-netbeans\nbi\engine\native\launcher\windows\dist\nlw.exe

Hint: Do compile with the with configuration "Debug". The options are 
only added here, especially the needed libraries. In my opinion there 
are no real debug compiler options set in the "Debug" configuration. The 
Release configuration is not set up.

Does someone see something missing or incorrect?

What to do with the nlw.exe? Pull request?

Andreas


Am 05.01.19 um 21:27 schrieb Emilian Bold:
> PS: I case somebody reads the thread, we used to have a nlw exe here
> https://github.com/emilianbold/netbeans-releases/tree/master/nbi/engine/native/launcher/windows/dist
>
> --emi
>
> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>
> On Sat, Jan 5, 2019 at 10:10 PM Emilian Bold <em...@gmail.com> wrote:
>> If you get it working do come back and contribute. We did recompile
>> the netbeans.exe launchers for NetBeans 9 (and we are reusing them for
>> NetBeans 10 too), but I don't remember a discussion about some other
>> exe to recompile.
>>
>> Note that the NetBeans installer is just being donated (there's a PR
>> about it on GitHub) but I see that nbi has been donated since the
>> start. So... just to be safe I reopened
>> https://issues.apache.org/jira/browse/NETBEANS-1157 , perhaps there's
>> something missing.
>>
>> --emi
>>
>> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>>
>> On Sat, Jan 5, 2019 at 9:55 PM Michael Huang <Mi...@spisim.com> wrote:
>>> Hi,
>>>
>>>    Thanks for the update.
>>>
>>>    Yes, I think that may be the case (it was not recompiled). I didn't find
>>> nlw.exe from the Netbeans10 source and now I remember that I populated that
>>> from Netbeans 9.0.... including the problematic source. It's good that it's
>>> now fixed.
>>>
>>>    I will try to find recompiled nlw.exe as I'm having trouble recompiling a
>>> working one using VisualStudio 2017 (the project was using Visual Studio
>>> 2005).
>>>
>>> Regards,
>>>
>>> MH
>>> -----------------------------------------------
>>> SPISim:  [www.spisim.com]
>>> EDA in Signal, Power Integrity and SIMulation
>>> -----------------------------------------------
>>>
>>>
>>> On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:
>>>
>>>> Maybe we are looking at different versions of JavaUtils.c but to me it
>>>> looks like it has a small parser and it expressly supports major
>>>> versions with more digits:
>>>>
>>>> https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
>>>>
>>>> This has been fixed since  Aug 21st by Andreas Hauffe in
>>>> NETBEANS-1157, see
>>>>
>>>> https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
>>>>
>>>> So you are saying the exe file from NetBeans 10 is not good? Maybe we
>>>> never recompiled it?
>>>>
>>>> --emi
>>>>
>>>> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>>>>
>>>> On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
>>>> wrote:
>>>>> Hi,
>>>>>
>>>>>    I think there is a bug in nbi's JavaUtils.c, line 125
>>>>> (Function getJavaVersionFromString), when it's used to unpack JVM of
>>>>> version 10 or above such as OpenJDK11. This will affect netbeans launcher
>>>>> on windows (nlw.exe) and thus need to have it rebuild after code fix.
>>>>>
>>>>>    The current codes' assumption is that Java version (java -version) show
>>>>> MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
>>>> use
>>>>> string[1] to check "." first. For OpenJDK11, the java -version will show
>>>>> 11.X... and thus the dot "." will not appear at the string[1]. As a
>>>> result,
>>>>> result code of "ERROR_OK" will not be assigned and JVM unpacking will
>>>> fail.
>>>>>    I have never committed codes to netbeans myself and thus will leave
>>>> this
>>>>> for someone more familiar with the code committing process to review
>>>> first
>>>>> and then commit if necessary. Hope this will help those whom may need
>>>>> NetBeans launcher to unpack JVM during installation process on windows.
>>>>>
>>>>>    Thanks and regards,
>>>>>
>>>>> MH
>>>>> -----------------------------------------------
>>>>> SPISim:  [www.spisim.com]
>>>>> EDA in Signal, Power Integrity and SIMulation
>>>>> -----------------------------------------------
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
>>>> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>>>>
>>>> For further information about the NetBeans mailing lists, visit:
>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>>
>>>>
>>>>
>>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
-- 
Viele Grüße
Andreas Hauffe
Leiter des Forschungsfeldes "Auslegungsmethoden für Luftfahrzeuge"

----------------------------------------------------------------------------------------------------
Technische Universität Dresden
Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering
Lehrstuhl für Luftfahrzeugtechnik / Chair of Aircraft Engineering

D-01062 Dresden
Germany

phone : +49 (351) 463 38496
fax :  +49 (351) 463 37263
mail : andreas.hauffe@tu-dresden.de
Website : http://tu-dresden.de/mw/ilr/lft
----------------------------------------------------------------------------------------------------
Do you know our free laminate analysis code eLamX²? If not, please visit the following web address:
http://www.elamx.de



Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Emilian Bold <em...@gmail.com>.
PS: I case somebody reads the thread, we used to have a nlw exe here
https://github.com/emilianbold/netbeans-releases/tree/master/nbi/engine/native/launcher/windows/dist

--emi

http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!

On Sat, Jan 5, 2019 at 10:10 PM Emilian Bold <em...@gmail.com> wrote:
>
> If you get it working do come back and contribute. We did recompile
> the netbeans.exe launchers for NetBeans 9 (and we are reusing them for
> NetBeans 10 too), but I don't remember a discussion about some other
> exe to recompile.
>
> Note that the NetBeans installer is just being donated (there's a PR
> about it on GitHub) but I see that nbi has been donated since the
> start. So... just to be safe I reopened
> https://issues.apache.org/jira/browse/NETBEANS-1157 , perhaps there's
> something missing.
>
> --emi
>
> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>
> On Sat, Jan 5, 2019 at 9:55 PM Michael Huang <Mi...@spisim.com> wrote:
> >
> > Hi,
> >
> >   Thanks for the update.
> >
> >   Yes, I think that may be the case (it was not recompiled). I didn't find
> > nlw.exe from the Netbeans10 source and now I remember that I populated that
> > from Netbeans 9.0.... including the problematic source. It's good that it's
> > now fixed.
> >
> >   I will try to find recompiled nlw.exe as I'm having trouble recompiling a
> > working one using VisualStudio 2017 (the project was using Visual Studio
> > 2005).
> >
> > Regards,
> >
> > MH
> > -----------------------------------------------
> > SPISim:  [www.spisim.com]
> > EDA in Signal, Power Integrity and SIMulation
> > -----------------------------------------------
> >
> >
> > On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:
> >
> > > Maybe we are looking at different versions of JavaUtils.c but to me it
> > > looks like it has a small parser and it expressly supports major
> > > versions with more digits:
> > >
> > > https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
> > >
> > > This has been fixed since  Aug 21st by Andreas Hauffe in
> > > NETBEANS-1157, see
> > >
> > > https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
> > >
> > > So you are saying the exe file from NetBeans 10 is not good? Maybe we
> > > never recompiled it?
> > >
> > > --emi
> > >
> > > http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
> > >
> > > On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > >   I think there is a bug in nbi's JavaUtils.c, line 125
> > > > (Function getJavaVersionFromString), when it's used to unpack JVM of
> > > > version 10 or above such as OpenJDK11. This will affect netbeans launcher
> > > > on windows (nlw.exe) and thus need to have it rebuild after code fix.
> > > >
> > > >   The current codes' assumption is that Java version (java -version) show
> > > > MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
> > > use
> > > > string[1] to check "." first. For OpenJDK11, the java -version will show
> > > > 11.X... and thus the dot "." will not appear at the string[1]. As a
> > > result,
> > > > result code of "ERROR_OK" will not be assigned and JVM unpacking will
> > > fail.
> > > >
> > > >   I have never committed codes to netbeans myself and thus will leave
> > > this
> > > > for someone more familiar with the code committing process to review
> > > first
> > > > and then commit if necessary. Hope this will help those whom may need
> > > > NetBeans launcher to unpack JVM during installation process on windows.
> > > >
> > > >   Thanks and regards,
> > > >
> > > > MH
> > > > -----------------------------------------------
> > > > SPISim:  [www.spisim.com]
> > > > EDA in Signal, Power Integrity and SIMulation
> > > > -----------------------------------------------
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> > > For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> > >
> > > For further information about the NetBeans mailing lists, visit:
> > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > >
> > >
> > >
> > >

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

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




Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Emilian Bold <em...@gmail.com>.
If you get it working do come back and contribute. We did recompile
the netbeans.exe launchers for NetBeans 9 (and we are reusing them for
NetBeans 10 too), but I don't remember a discussion about some other
exe to recompile.

Note that the NetBeans installer is just being donated (there's a PR
about it on GitHub) but I see that nbi has been donated since the
start. So... just to be safe I reopened
https://issues.apache.org/jira/browse/NETBEANS-1157 , perhaps there's
something missing.

--emi

http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!

On Sat, Jan 5, 2019 at 9:55 PM Michael Huang <Mi...@spisim.com> wrote:
>
> Hi,
>
>   Thanks for the update.
>
>   Yes, I think that may be the case (it was not recompiled). I didn't find
> nlw.exe from the Netbeans10 source and now I remember that I populated that
> from Netbeans 9.0.... including the problematic source. It's good that it's
> now fixed.
>
>   I will try to find recompiled nlw.exe as I'm having trouble recompiling a
> working one using VisualStudio 2017 (the project was using Visual Studio
> 2005).
>
> Regards,
>
> MH
> -----------------------------------------------
> SPISim:  [www.spisim.com]
> EDA in Signal, Power Integrity and SIMulation
> -----------------------------------------------
>
>
> On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:
>
> > Maybe we are looking at different versions of JavaUtils.c but to me it
> > looks like it has a small parser and it expressly supports major
> > versions with more digits:
> >
> > https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
> >
> > This has been fixed since  Aug 21st by Andreas Hauffe in
> > NETBEANS-1157, see
> >
> > https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
> >
> > So you are saying the exe file from NetBeans 10 is not good? Maybe we
> > never recompiled it?
> >
> > --emi
> >
> > http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
> >
> > On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
> > wrote:
> > >
> > > Hi,
> > >
> > >   I think there is a bug in nbi's JavaUtils.c, line 125
> > > (Function getJavaVersionFromString), when it's used to unpack JVM of
> > > version 10 or above such as OpenJDK11. This will affect netbeans launcher
> > > on windows (nlw.exe) and thus need to have it rebuild after code fix.
> > >
> > >   The current codes' assumption is that Java version (java -version) show
> > > MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
> > use
> > > string[1] to check "." first. For OpenJDK11, the java -version will show
> > > 11.X... and thus the dot "." will not appear at the string[1]. As a
> > result,
> > > result code of "ERROR_OK" will not be assigned and JVM unpacking will
> > fail.
> > >
> > >   I have never committed codes to netbeans myself and thus will leave
> > this
> > > for someone more familiar with the code committing process to review
> > first
> > > and then commit if necessary. Hope this will help those whom may need
> > > NetBeans launcher to unpack JVM during installation process on windows.
> > >
> > >   Thanks and regards,
> > >
> > > MH
> > > -----------------------------------------------
> > > SPISim:  [www.spisim.com]
> > > EDA in Signal, Power Integrity and SIMulation
> > > -----------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> > For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >

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

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




Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Mark Phipps <ma...@sucfin.com>.
Hi All,

I have been having great difficulty in getting a Platform installer to 
work with a bundled JDK 11...

After much hard work, I eventually had great success with JDK 8 JREs 
(Using both Open JDK and Zulu), starting off by following the 
instructions from https://dzone.com/articles/including-jre-in-nbi

Now trying to migrate to JDK 11, I am using jlink to create a JRE and 
bundle this in the same way. Works on Linux, but no matter what I try, 
the installer always objects on Windows, saying that there is no Java 
available, which is maddening because it just extracted the JVM and 
executed it with it's test-java-class (I think...).

I would like to examine the tmp directory that the installer creates, 
but it deletes that and I cannot find a switch to disable that behaviour.

I can't understand how the NBI installers are actually created - the 
relationship between the C code, exe launchers, shell scripts, 
nbi.engine, harness/libs.nbi.engine is unclear to me and the NBI 
Developer page doesn't explain the details. http://wiki.netbeans.org/NBI

My feeling is that there is work to be done for updating the NBI system 
and I would be happy to help - but I don't know how to build it surgically.

Has anyone out there had real success with a bundled JDK11 installer on 
Windows yet?

Some of the scripting to create the JVM and output of my installer is 
here: https://gist.github.com/phipma/a513d4f8e7a6a93811ffde09fbedf6ce

Thanks

Mark


On 05/01/2019 19:55, Michael Huang wrote:
> Hi,
>
>    Thanks for the update.
>
>    Yes, I think that may be the case (it was not recompiled). I didn't find
> nlw.exe from the Netbeans10 source and now I remember that I populated that
> from Netbeans 9.0.... including the problematic source. It's good that it's
> now fixed.
>
>    I will try to find recompiled nlw.exe as I'm having trouble recompiling a
> working one using VisualStudio 2017 (the project was using Visual Studio
> 2005).
>
> Regards,
>
> MH
> -----------------------------------------------
> SPISim:  [www.spisim.com]
> EDA in Signal, Power Integrity and SIMulation
> -----------------------------------------------
>
>
> On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:
>
>> Maybe we are looking at different versions of JavaUtils.c but to me it
>> looks like it has a small parser and it expressly supports major
>> versions with more digits:
>>
>> https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
>>
>> This has been fixed since  Aug 21st by Andreas Hauffe in
>> NETBEANS-1157, see
>>
>> https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
>>
>> So you are saying the exe file from NetBeans 10 is not good? Maybe we
>> never recompiled it?
>>
>> --emi
>>
>> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>>
>> On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
>> wrote:
>>> Hi,
>>>
>>>    I think there is a bug in nbi's JavaUtils.c, line 125
>>> (Function getJavaVersionFromString), when it's used to unpack JVM of
>>> version 10 or above such as OpenJDK11. This will affect netbeans launcher
>>> on windows (nlw.exe) and thus need to have it rebuild after code fix.
>>>
>>>    The current codes' assumption is that Java version (java -version) show
>>> MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
>> use
>>> string[1] to check "." first. For OpenJDK11, the java -version will show
>>> 11.X... and thus the dot "." will not appear at the string[1]. As a
>> result,
>>> result code of "ERROR_OK" will not be assigned and JVM unpacking will
>> fail.
>>>    I have never committed codes to netbeans myself and thus will leave
>> this
>>> for someone more familiar with the code committing process to review
>> first
>>> and then commit if necessary. Hope this will help those whom may need
>>> NetBeans launcher to unpack JVM during installation process on windows.
>>>
>>>    Thanks and regards,
>>>
>>> MH
>>> -----------------------------------------------
>>> SPISim:  [www.spisim.com]
>>> EDA in Signal, Power Integrity and SIMulation
>>> -----------------------------------------------
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
>> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>
>>
>>

www.sucdenfinancial.com

Sucden Financial Limited, Plantation Place South, 60 Great Tower Street, London EC3R 5AZ
Telephone +44 203 207 5000

Registered in England no. 1095841
VAT registration no. GB 446 9061 33

Authorised and Regulated by the Financial Conduct Authority (FCA) and entered in the FCA register under no. 114239

This email, including any files transmitted with it, is confidential and may be privileged. It may be read, copied and used only by the intended recipient. 
If you are not the intended recipient of this message, please notify postmaster@sucfin.com immediately and delete it from your computer system.

We believe, but do not warrant, that this email and its attachments are virus-free, but you should check.

Sucden Financial Limited may monitor traffic data of both business and personal emails. By replying to this email, you consent to Sucden Financial 's monitoring 
the content of any emails you send to or receive from Sucden Financial . Sucden Financial is not liable for any opinions expressed by the sender where this is a 
non-business email.

The contents of this e-mail do not constitute advice and should not be regarded as a recommendation to buy, sell or otherwise deal with any particular investment. 
Where any trade ideas are made by an employee of Sucden Financial in an electronic communication, these are made incidentally to your dealing relationship with 
us and are provided solely to enable you to make your own investment decisions and do not amount to advice. Please note that the employee may have had many, varied 
trade ideas over the past 12 months, including contrary ideas. Any trade ideas are solely based on the employee’s market knowledge and experience and may not be 
tailored to your specific circumstances or investment objectives. Please contact the employee who made the trade idea if you would like to see any of his/her trade 
ideas made in the previous 12 months for comparative purposes. Please visit our website to view our full risk warnings and disclaimers: www.sucdenfinancial.com.  

This message has been scanned for viruses by Mimecast.

Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Michael Huang <Mi...@spisim.com>.
Hi,

  Thanks for the update.

  Yes, I think that may be the case (it was not recompiled). I didn't find
nlw.exe from the Netbeans10 source and now I remember that I populated that
from Netbeans 9.0.... including the problematic source. It's good that it's
now fixed.

  I will try to find recompiled nlw.exe as I'm having trouble recompiling a
working one using VisualStudio 2017 (the project was using Visual Studio
2005).

Regards,

MH
-----------------------------------------------
SPISim:  [www.spisim.com]
EDA in Signal, Power Integrity and SIMulation
-----------------------------------------------


On Sat, Jan 5, 2019 at 11:43 AM Emilian Bold <em...@gmail.com> wrote:

> Maybe we are looking at different versions of JavaUtils.c but to me it
> looks like it has a small parser and it expressly supports major
> versions with more digits:
>
> https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138
>
> This has been fixed since  Aug 21st by Andreas Hauffe in
> NETBEANS-1157, see
>
> https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00
>
> So you are saying the exe file from NetBeans 10 is not good? Maybe we
> never recompiled it?
>
> --emi
>
> http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!
>
> On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com>
> wrote:
> >
> > Hi,
> >
> >   I think there is a bug in nbi's JavaUtils.c, line 125
> > (Function getJavaVersionFromString), when it's used to unpack JVM of
> > version 10 or above such as OpenJDK11. This will affect netbeans launcher
> > on windows (nlw.exe) and thus need to have it rebuild after code fix.
> >
> >   The current codes' assumption is that Java version (java -version) show
> > MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes
> use
> > string[1] to check "." first. For OpenJDK11, the java -version will show
> > 11.X... and thus the dot "." will not appear at the string[1]. As a
> result,
> > result code of "ERROR_OK" will not be assigned and JVM unpacking will
> fail.
> >
> >   I have never committed codes to netbeans myself and thus will leave
> this
> > for someone more familiar with the code committing process to review
> first
> > and then commit if necessary. Hope this will help those whom may need
> > NetBeans launcher to unpack JVM during installation process on windows.
> >
> >   Thanks and regards,
> >
> > MH
> > -----------------------------------------------
> > SPISim:  [www.spisim.com]
> > EDA in Signal, Power Integrity and SIMulation
> > -----------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: [NBI Launcher] nbi/nlw.exe broken for OpenJDK 11

Posted by Emilian Bold <em...@gmail.com>.
Maybe we are looking at different versions of JavaUtils.c but to me it
looks like it has a small parser and it expressly supports major
versions with more digits:
https://github.com/apache/incubator-netbeans/blob/master/nbi/engine/native/launcher/windows/src/JavaUtils.c#L138

This has been fixed since  Aug 21st by Andreas Hauffe in
NETBEANS-1157, see
https://github.com/apache/incubator-netbeans/commit/57cb8c469fb6024de3a3b9702fa468302acb4039#diff-f0f864825c4c1d5461c1a84cc9aa9e00

So you are saying the exe file from NetBeans 10 is not good? Maybe we
never recompiled it?

--emi

http://coolbeans.xyz/ - CoolBeans: An IDE for Java, JavaEE, PHP and more!

On Sat, Jan 5, 2019 at 9:26 PM Michael Huang <Mi...@spisim.com> wrote:
>
> Hi,
>
>   I think there is a bug in nbi's JavaUtils.c, line 125
> (Function getJavaVersionFromString), when it's used to unpack JVM of
> version 10 or above such as OpenJDK11. This will affect netbeans launcher
> on windows (nlw.exe) and thus need to have it rebuild after code fix.
>
>   The current codes' assumption is that Java version (java -version) show
> MAJOR.MINOR and the MAJOR only has one digit (e.g. 1.8, 1.7 etc). Codes use
> string[1] to check "." first. For OpenJDK11, the java -version will show
> 11.X... and thus the dot "." will not appear at the string[1]. As a result,
> result code of "ERROR_OK" will not be assigned and JVM unpacking will fail.
>
>   I have never committed codes to netbeans myself and thus will leave this
> for someone more familiar with the code committing process to review first
> and then commit if necessary. Hope this will help those whom may need
> NetBeans launcher to unpack JVM during installation process on windows.
>
>   Thanks and regards,
>
> MH
> -----------------------------------------------
> SPISim:  [www.spisim.com]
> EDA in Signal, Power Integrity and SIMulation
> -----------------------------------------------

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

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