Search code examples
javarubymacosexecutable-jarshoes

JavaAppLauncher on Mac


I used Watir and Shoes 4 to make a ruby program. Then, I used the packaging instruction from https://github.com/shoes/shoes4 to make an app.

This app crashed immediately after I click to run it on Macs - leave this bit for a moment because I asked this in another thread. However, I can 'Show package contents' and then find these two folders 'Java' and 'MacOS'. 'Java' contains a jar file. 'MacOS' contains a JavaAppLauncher.

Now, I can click on this JavaAppLauncher, then it opens a terminal and runs my app. The problem is that JavaAppLauncher runs on the ~ root dir in this terminal where doesn't contain the files that the app should read from. Those files were in the same dir where the source code was. I suppose those files should be packaged, but apparently they are not.

How am I supposed to solve this?

  1. Can JavaAppLauncher open a terminal and run from the dir where JavaAppLauncher sits?
  2. Can I write a script to move the files to the root dir while running the app and remove them when it's finished?

Thanks!


Solution

  • Well, the files are packaged. However, packaging is still a baby which will be updated in later versions.