I tried to use Keep in Dock option with a Java application that is started from the command line but when I try to restart the application it will fail - and this is happening because it will start java without any parameters.

There are two ways of starting the application on OS X but both of them fail if you want to use the Keep in Dock option.

1 Answer
1

You could write a shell script to invoke the java app with the parameters you need, then wrap it up in an app with Platypus.

The resultant app can then be put in the Dock like any other app.

I've used it for a variety of tasks, such as popping-up a help screen with a serial number for users to enter for a recalcitrant app which didn't like mass deployment and would ask the user to enter it at first run, to a complicated script which mounted a disk-image of a science textbook's additional media DVD and then ran the associated app to access the content. Platypus even allowed me to roll the disk-image into the final app itself, making deployment easier.