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.
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
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