How to create a desktop shortcut to a JAR file?
Hello.
I have installed Paros Web Proxy successfully. I can run the program by going to the command line and entering: Code:
java -jar paros.jar Code:
java -jar /full_path/paros.jar I see the similarities to Vista, but since no version of Windows really tells you exactly what is happening when you create a shortcut, I have never thought much about them. What is it I am missing? |
Try creating a bash script to run the commands that launch your application and link to the script for your shortcut. By way of illustration, create a text file in your home directory called do_paros and put this text in it:
Code:
#!/bin/bash $ chmod a+x do_paros And test the script from the command line to make sure it opens your application by running: $ ./do_paros If that works OK, then close the console and try running the script by double clicking on the do_paros file and see if it launches the application. If that works, create a shorcut to do_paros on your desktop and it should work fine. |
This did not work either, but the good news is that the error produced by this method is the same as the errors from the methods I tried earlier. Here is the error:
Exception in thread "main" java.io.FileNotFoundException: db/parosdb.data (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:137) at org.parosproxy.paros.model.FileCopier.copyLegacy(Unknown Source) at org.parosproxy.paros.model.FileCopier.copy(Unknown Source) at org.parosproxy.paros.model.Model.createAndOpenUntitledDb(Unknown Source) at org.parosproxy.paros.model.Model.init(Unknown Source) at org.parosproxy.paros.Paros.run(Unknown Source) at org.parosproxy.paros.Paros.main(Unknown Source) I think that because the shortcuts are not running in the paros folder, the paros program is looking for the file db/parosdb.data in the shortcuts directory rather than the paros directory. I am not sure how to work around this though. |
OK. I edited the shortcut file to read:
#!/bin/bash cd /home/ubuntu/programs/paros java -jar paros.jar This worked. I have been using windows for a decade so Linux is taking some getting used to. Thanks for the help. |
Quote:
There might / should have been an option for you to do this ( there is in KDE ). Now it's working, be happy. |
All times are GMT -5. The time now is 09:08 AM. |