This question is an exact duplicate of:

When I run the *.jar file my Ubuntu pops up an error message with

The file /... is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run.

Though when I right clicked the *.jar file and got to its Properties > Open With, the Default Application to open this kind of file was already set to OpenJDK Java 7 Runtime.

What is wrong here?

marked as duplicate by karel, Eric Carvalho, edwinksl, Anwar, amc Aug 16 '16 at 15:04

This question was marked as an exact duplicate of an existing question.

  • 2
    You have to give it the executable bit to run it, or use java filename.jar to execute it (replace filename accordingly) – Thomas Ward Mar 14 '16 at 18:55

1) Open a terminal (CTRL+ALT+T)

2) cd into the directory containing the Jar file

3) sudo chmod +x yourfile.jar (Replace filename)

4) java -jar yourfile.jar (Replace filename)


Open the properties again, select the tab "Permissions" and mark the checkbox "Allow executing file as program".

file properties - Permissions tab

Not the answer you're looking for? Browse other questions tagged or ask your own question.