1

I'm trying to make a .app that will run a simple bash script to launch a java app. I found instructions for making a suitable .app container and running the .app runs my bash. Great.

The problem is, I want to put my java app inside the .app but i'm not sure how to get my bash script to launch it.

Here's my current script:

#! /bin/sh

/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -jar -Xmx1g javaapp.jar&

The script runs and shuts down immediately. I'm assuming because it either can't find /java or javaapp.jar which I put in the .app container in the same folder as the bash script (MacOS)

8
  • You meant to type a space before the trailing ampersand? Commented Apr 29, 2015 at 13:58
  • That made no difference, thanks. Commented Apr 29, 2015 at 14:06
  • Begin your script with #!/bin/bash -x which will give you debug output. Then you can see what's happening. Commented Apr 29, 2015 at 14:42
  • There's nowhere for the debug to go though. It doesn't open a shell. Commented Apr 29, 2015 at 14:43
  • Valid point... I'm assuming you checked to see that the script is executable? Also, would you mind posting a link to the instructions you followed so we can replicate? Commented Apr 29, 2015 at 14:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.