can't find "allow executing file as program" checkbox

12,360

The option, to make a file executable is only shown for programs that the file manager considers to be of an executable file type. Jar-files are not in that list, although on Ubuntu setting them executable allows you to run them (maybe this should be reported as a bug?). Depending on the settings used when compiling the kernel (or generally on other operating systems), setting jar files executable might not work, and I guess this is the reason why file managers don't consider them runnable.

So, your options are:

  • Use the command line tool chmod to add the execute permission. (chmod +x <filename>)
  • Don't care about execute permissions and just always run java -jar <filename>.
    • You can create a launcher icon that runs this command.
    • You can create a write a wrapper shell script that can then be set executable. Most java programs available in the Ubuntu repositories install such a wrapper to /usr/bin, while the jar files reside in /usr/share/java
Share:
12,360

Related videos on Youtube

Paindeer
Author by

Paindeer

Updated on September 18, 2022

Comments

  • Paindeer
    Paindeer over 1 year

    I'm currently trying to run a game on xubuntu that is downloaded as a .jar and to make it work I need to check of a box that says "allow executing file as program" I know where the box should be for everyone else but it isn't there for me. I use xubuntu 12.04 and the check box should be under properties> permissions.

    • Warren Hill
      Warren Hill almost 11 years
      You can do it from a command line with chmod a+x file replacing file with with the file name. Otherwise have you tried right clicking the file and selecting properties. I don't use Xubuntu so I have a different file manager but right click works in Ubuntu and Lubuntu. You may need to prefix the command with sudo if you don't have write permissions for the file
    • Danatela
      Danatela almost 11 years
      Also it is possible that file was downloaded by another user. In this case, the chown command can help.
  • Paindeer
    Paindeer almost 11 years
    Thank you so much for your help everything I needed worked perfectly.