First try to bundle JRE 8. If that works, then try to bundle JRE 10. Doing it like this makes it easier to narrow down the problem.
Gj On Mon, Aug 20, 2018 at 8:10 AM, Andreas Hauffe < andreas.hau...@tu-dresden.de> wrote: > Hi, > > I'm trying to bundle a JRE 10.0.2 to a netbeans platform application. I'm > using the following article https://dzone.com/articles/inc > luding-jre-in-nbi and change the part of creating the zip file of the jre > by something like the following lines > > jlink --strip-debug --no-header-files --no-man-pages --output jre_lin_x64 > --module-path ${JRE_PATH}/jmods --add-modules java.scripting,java.desktop,ja > va.instrument,java.logging,java.naming,jdk.localedata,jdk. > management,jdk.pack,jdk.jdwp.agent --include-locales=en,de > zip -9 -r -y ../jre_win_x64.zip . > > (The commands vary from linux to windows.) > > But when running the installer I'm getting an error that there is no jre. > And in the logs show: > > [2018-08-17 17:21:25.887]> Create new process: > [2018-08-17 17:21:25.887]> command : > C:\Users\${USER}\AppData\Local\Temp\\NBI60854.tmp\_jvm\bin\java.exe > -classpath C:\Users\ADMINI~1.ILR\AppData\Local\Temp\\NBI60854.tmp TestJDK > [2018-08-17 17:21:25.887]> directory : C:\Temp > [2018-08-17 17:21:26.180]> ... no java at C:\Users\${USER}\AppData\Local > \Temp\\NBI60854.tmp\_jvm > [2018-08-17 17:21:26.180]> ... check private jre at > C:\Users\${USER}\AppData\Local\Temp\\NBI60854.tmp\_jvm\jre > [2018-08-17 17:30:37.086]> No compatible jvm was found on the system > > But when looking into the path, there is a JRE and a java.exe and the > command is running correctly. > > Did someone have this working already? > > Is there a problem with the version number of Java 10? I'm not used to C, > but when looking into the getJavaVersionFromString from > https://github.com/apache/incubator-netbeans/blob/master/ > nbi/engine/native/launcher/windows/src/JavaUtils.c it can be a problem. > This is the installer source code, right? > > -- > Regards, > Andreas Hauffe > > >