TheInfiniteKind / appbundler

74 stars 24 forks source link

Runtime misleading msg NoSuchFileException: /Users/paul/code/jthink/songkong/MacOS if provide invalid java path #64

Open ijabz opened 4 years ago

ijabz commented 4 years ago

Just setting up on a new machine, build file that previously worked on another computer with older version of appbundler is now failing on new machine with

BUILD FAILED /Users/paul/code/jthink/songkong/buildtmp.xml:21: java.nio.file.NoSuchFileException: /Users/paul/code/jthink/songkong/MacOS at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:526) at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253) at java.nio.file.Files.copy(Files.java:1274) at com.oracle.appbundler.AppBundlerTask.copy(AppBundlerTask.java:998) at com.oracle.appbundler.Runtime.copyTo(Runtime.java:104) at com.oracle.appbundler.AppBundlerTask.copyRuntime(AppBundlerTask.java:521) at com.oracle.appbundler.AppBundlerTask.execute(AppBundlerTask.java:458) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99) at org.apache.tools.ant.Task.perform(Task.java:350) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:184) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93) at org.apache.tools.ant.Main.runBuild(Main.java:805) at org.apache.tools.ant.Main.startAnt(Main.java:223) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Since Im using <bundleapp outputdirectory="/Applications" it seems the code in Runtime is ignoring outputdirectory and defaulting to current dir ?

ijabz commented 4 years ago

If I remove the runtime element <runtime dir="${env.JAVA_HOME}"/> it works, but thats no good to me because it wont bundle Java. I thought the problem might be the value of runtime so changed to: <runtime dir="/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk"/> but gave same error

ijabz commented 4 years ago

~`But Setting

<runtime dir="/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home"/>

works, so my mistake but error very misleading, will rename issue.