Reputation: 15305
I have a tiny batch file to kick off my java app:
its code is something as simple as
java -jar myapp.jar
(in reality it's slightly more complicated as we set a few properties)
A friend of mine has a mac. He has java installed on his mac. But how do we run this batch from mac ?
Upvotes: 2
Views: 1856
Reputation: 168815
If the Java app. is a desktop app. with a GUI, a good way to launch it is using Java Web Start. JWS provides the ability to set properties in the JNLP launch file.
JWS works on all desktop JREs. E.G. it will work on Windows, Mac. and *nix.
Upvotes: 1
Reputation: 11628
Put the following code into a file and run chmod +x <filename>
to make it executable.
#!/bin/sh
java -jar myapp.jar
Upvotes: 5