1

When I try to open minecraft.jar it always opens using the wine program. What can I do to fix that? I've tried re-installing minecraft.jar. But that just re-opens the wine program.

2
  • please search a little in the future askubuntu.com/questions/636005/…, there are a lot of topics about minecraft on this site already Jun 16, 2015 at 15:01
  • I have added my answer. If you need further clarification please comment. Please accept the answer if it is working.
    – Snake Eyes
    Jun 16, 2015 at 20:08

3 Answers 3

2

Open the Terminal .go to the file location using cd command and use the java command to run any .jar file:

java -jar minecraft.jar
1

You can run a .jar in a terminal like this

java -jar location/of/your/minecraft.jar

To make a file you can click to open, open Gedit and paste the following code (edited for your location) in to a new document, then save it where you like and name it minecraft.sh.

#!/bin/bash
java -jar location/of/your/minecraft.jar

Now right click minecraft.sh and choose properties and then the permissions tab and check the box Execute, now close this and double click minecraft.sh and Minecraft will run.

This is called a bash script and essentially allows running commands from a script (.sh) file, it is very easy to learn.

You can find documentation on bash scripting HERE.

If you want to create a icon to click and add to the Unity launcher, you can make a .desktop like this.

Open Gedit and paste the following code into it and save as minecraft.desktop and now right click minecraft.desktop and choose properties and then the permissions tab and check the box Execute

[Desktop Entry]
Type=Application
Name=MineCraft
GenericName=Minecraft
Comment=Start Minecraft
Icon=/home/username/.icons/minecraft.png ## choose any Icon you like
Exec=java -jar /full/path/to/minecraft.jar
Categories=Games

As you can see this is more complicated, but we will go over it.

Type=Application - This is the type of program the file will execute.

Name=MineCraft - Name of the created executable

GenericName=Minecraft - Don't know how this differs from name (maybe someone can edit)

Comment=Start Minecraft - This is a comment on what the file will do

Icon=/home/username/.icons//minecraft.png - This is where you can put a picture of your choice to be the icon, it must go in your home/username/.icons

Exec=java -jar /full/path/to/minecraft.jar - Is the command the file will execute

Categories=Games - Is just the Category of the application

Some documentation for this is HERE

This is a common issue with things like Minecraft that don't install or click to execute so this should cover peoples needs for executing and adding icons.

0

Minecraft is available for linux users but the installation of the game is not as easy as it may seem. some distributions are not built ready for a graphic and java heavy game. here is a link to a tutorial on how to properly install minecraft on a linux system.

http://www.howtogeek.com/198476/how-to-install-minecraft-on-ubuntu-or-any-other-linux-distribution/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .