I'm using Elementary OS. How do I mark a .jar file as executable. I do have JDK installed, but I get an error saying it isn't marked as executable.
1 Answer 1
You can either open a terminal and run
chmod +x yourfile.jar
or right-click the file in the file manager, open the Properties
window, switch to the Permissions
tab and check the Execute
box in the Owner:
row.1
1: At least that's the way it works in Nautilus/Files (GNOME's default file manager) which Pantheon's Files seems to be resembling quite closely.
You could also avoid the need to mark it as executable by using the Java executable to invoke it:
java -jar yourfile.jar
-
I tried using nautilus to go to properties and check the box with execute but the second after I check it, it unchecks by itself,which is really wired....Daniel Bejan– Daniel Bejan2013年12月24日 13:56:52 +00:00Commented Dec 24, 2013 at 13:56
-
Have you tried setting it using
chmod
and checking if it persists?n.st– n.st2013年12月24日 14:03:57 +00:00Commented Dec 24, 2013 at 14:03 -
I managed to run it with chmod eventually...Thank you!Daniel Bejan– Daniel Bejan2013年12月24日 14:27:11 +00:00Commented Dec 24, 2013 at 14:27