Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get the minecraft.jar file to execute , but the check box won't come up when I go to Properties > Permissions. I don't know much about the terminal and its commands so if someone could post a simple step by step solution on how to mark it that would be great. People keep saying to use a chmod command but I have no idea what that is, so you are forewarned if I say "over my head".

share|improve this question
jars don't need to be executable. you can launch them with an interpreter just like python and have a launcher script (which I think is the generally accepted practice). – RobotHumans Sep 19 '13 at 0:13
Have you tried right clicking the jar, and selecting "Open With > OpenJDK (or whatever java)"? – Richard Sep 19 '13 at 0:13
up vote 2 down vote accepted

Assuming the file in question is in your $HOME (just move it with the GUI otherwise), open a terminal (that much should be easy :) then run this command:

chmod a+x jarfile.jar

Change jarfile.jar to the actual name of the file in question of course. If that gives you an error, the file is probably not owned by your user, so try again with sudo:

sudo chmod a+x jarfile.jar
share|improve this answer
Files in your home directory should not be owned by root – minerz029 Sep 19 '13 at 0:13
THANK YOU SOOOO MUCH!!! – Ben Sep 19 '13 at 0:16
It worked perfectly! – Ben Sep 19 '13 at 0:17
@terdon thank you sooo much! – Ben Sep 19 '13 at 0:19
@terdon Iknow it says I have to wait 5 minuets – Ben Sep 19 '13 at 0:20

Jar files are supposed to be executed like I've shown below (assuming you have configured JRE/JDK in the execution search path):

java -jar /path/to/jarfile.jar

You CANNOT directly execute a JAR file even if you add the execute bit. By itself bash is simply not able to understand it.

A simple shell script will be ideal to run Minecraft, for example:

java -Xms1024M -Xmx1024M -jar /path/to/mincraft.jar
share|improve this answer
You are able to mark it as executable then open it with a double click. You just need to associate the MIME type with Java JRE – minerz029 Sep 19 '13 at 0:17
This is desktop environment specific, not flexible if JVM arguments need to be passed;-) But you are right anyway, double click executes jar files in DE/WM. – Terry Wang Sep 19 '13 at 0:21
WHat about self-extracting jar files? – terdon Sep 19 '13 at 0:21

Open a terminal with Ctrl+Alt+T, then type

chmod +x /path/to/jar_file.jar

If the check doesn't come up, it might be on a Windows filesystem, which wont work

share|improve this answer
I have had it work on 12.04 before but not this time so I don't know what to do. – Ben Sep 19 '13 at 0:13
@Ben Is it on your system drive or a external disk? – minerz029 Sep 19 '13 at 0:14
  1. Simply press CTRL+ALT+T
  2. type:

    java -Xms1024M -Xmx1024M -jar (copy and paste path to minecraft.jar)/Minecraft.jar
  3. Enjoy

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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