Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

  • start it using the shell script olv.sh
  • start the jar file logview.jar by clicking on it in Finder.

In case you want to debug, the application is http://code.google.com/p/otroslogviewer but I know that the same problem applies for other apps too.

How can I solve the problem so I can start the application from Dock and eventually from Finder also.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
I don't like the approach, but it's the only one I got so far. Thanks. –  sorin Aug 2 '12 at 9:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.