> On Feb 24, 2020, at 4:07 PM, Andy Herrick <andy.herr...@oracle.com> wrote:
> 
> 
> 
> 
> then in app you can find any of the tools by using 
> System.getProperty("java.home") and looking in "bin" subdir.
> 
> So in the app you can refer to any of the tools by their full path.
> 

Not to keep dragging this on. But I did notice JShell seems to need the java 
command. Without it…

Caused by: java.lang.InternalError: Failed remote listen: java.io.IOException: 
Cannot run program 
"/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/runtime/Contents/Home/bin/java":
 error=2, No such file or directory @ com.sun.jdi.SocketListen (defaults: 
timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=49326, 
localAddress=localAddress=127.0.0.1}
        at 
jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(Unknown Source)

Caused by: java.io.IOException: Cannot run program 
"/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/runtime/Contents/Home/bin/java":
 error=2, No such file or directory
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)

The path is as you indicate so either JShell is building the path or 
ProcessBuilder is. If the tool did it then it would seem to make things easier 
for the code using it. I wasn’t even remembering there was a java.home 
property. Runtime exec does not seem to do this.

Also if you just copy the command in you get…

error: No file system provider is available to handle this file: 
/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app/Contents/app/halfpipe.jar

It seems there is some special sauce jlink provides so this is now definitely 
not possible. As Kevin Rushforth said.



Reply via email to