问题
I am new to Ubuntu. I am trying to make a simple Java swing app(lets call it foo) that displays a hello message followed by a user name.I am using Eclipse .Till here everything works fine.When I press the "Run" button my app shows app without a problem.Now I export my app as a runnable jar but when I try to double click the generated jar to execute the following message:
Blocked: /usr/bin/java -jar
The file 'home/user/java projects/foo.jar' is not marked as executable.
However if I run this jar in windows I get no error. Any ideas how to solve the problem?I would like a detailed answer if possible.
Thanks in advance :)
回答1:
Finally thanks to @copeg 's comment I managed to fix my problem by doing:
chmod 774 foo.jar
回答2:
Have you tried the unmask config?
The umask command defines the default permissions for newly created files based on the "base" permissions set defined for files and directories.
Try to check it out: https://www.digitalocean.com/community/tutorials/linux-permissions-basics-and-how-to-use-umask-on-a-vps#umask
来源:https://stackoverflow.com/questions/38382459/foo-jar-is-not-marked-as-executable