How to create a launcher for a Java application
Ok I just downloaded this program called Phex, it is a really cool program and i get it to run, but only from command line. I downloaded this program and its already compiled and works fine but i can only launch it from a command line by typing "java -jar phex.jar"
I have created launchers before and they have worked, but this one just doesn't work. I have all permissions on the directory and the files, but how to create a launcher for this file. Can anyone help me? |
Give the full path to phex.jar in the command, or create a script containing the command (with full path) and launch that instead.
|
Thanks for this, I will give it a try and see if it works
|
Quote:
|
Ok I created a text file with the command "java -jar /usr/local/Phex/phex.jar" and gave it executable permissions and it works now. But the only thing is that when I double click it to start it it asks me "Do you want to run Phex? or display its contents?" "Phex" is an executable text file" and then it gives me the options "run in terminal" "display" "cancel" "run". If I click "run in terminal" the terminal opens, the program is executed and the program runs, but I need to have the terminal open while the program runs. If I click "display" it doesn't run, and if I click run it runs fine, but I want it to start just by double clicking on it without it asking me this question all the time. Do you know how can I do this?
|
The usual way to use such a "jar starter script" :
Copy the script to /usr/local/bin/ And create a launcher / "Icon" / "Phex.desktop" file that has : Exec=script-name. That works ! .. |
Quote:
Hey thanks for replying, I thought nobody was going to reply again, I will give it a try and see what happens. |
Quote:
( A command / solution is easier to remember, when you "invent" it yourself.) .. :) So that's a good reason to hold back an answer for a day or two. Also : It has been answered before, you might eventually have found this : http://www.linuxquestions.org/questions/search.php LQ Search → 'Tag Name' = java+jar .. |
Quote:
|
All times are GMT -5. The time now is 02:43 PM. |