2

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?

RegarBoy
  • 121

2 Answers2

5

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)

3

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

file properties - Permissions tab

cmks
  • 1,914