I'm running 32-bit Ubuntu 12.04 (on a 64-bit machine - don't ask). I have Oracle Java 8 installed as the default java version (confirmed using both 'java -version' and 'update -alternatives'), but also OpenJDK 6 and 7. which I prefer for some applications.
My question:
I have a .jar file, Start.jar (for a work program written in Java) which I use regularly. It opens and runs fine when run from the terminal (by switching to the relevant directory and running java -jar Start.jar
), but won't run from a .desktop file. Why is this?
The .desktop file contains the following:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Path=/home/jez/progpath
Exec=java -jar /home/jez/progname/Start.jar
Name=Progname
Icon=/home/jez/progname/CT.png
I've also tried it with:
Exec=java -jar Start.jar
The program includes a .sh file to launch a different .jar (we'll call it Alt.jar) to run the program. Alt.jar runs happily using a .desktop file very similar to the above to run the .sh file.
Simply amending the one line .sh file to run Start.jar rather than Alt.jar doesn't work either. (Again it opens and immediately closes a terminal window.)
The developer has recently informed me that I should be running Start.jar, not Alt.jar, hence my efforts to find an easy way to run Start.jar.
Both .jar files, the .sh file and the .desktop file all have their permissions set to 'Allow executing file as program'.
Note also that the program needs to run using Oracle Java 8, as it is not fully compatible with OpenJDK.
For completeness, the program in question is a computer-aided translation package called CafeTran (www.cafetran.com).
Path=
refers to the location of the command. Take that field completely out and try it. – TheWanderer Apr 13 '16 at 13:49Path
should readPath=/home/jez/progname
– Harris Apr 13 '16 at 13:54/home/jez/progname/
, which is different than the one inPATH
name variable. – Harris Apr 14 '16 at 20:24