How can I install Minecraft?

Solution 1:

It is not necessary to install Minecraft. All you need to do is install Java.

  1. Now right click on your Minecraft.jar file and select "Open with Oracle Java 7 Runtime"

That's it. Enjoy!

Related:

  • How do I install Java?
  • How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

Solution 2:

Installation of Minecraft for 12.04, 12.10, 13.04, 13.10, 14.04, 14.10 and 15.04 is now possible with a PPA.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update && sudo apt-get install minecraft-installer

What are PPAs and how do I use them?

Solution 3:

Here's a script to install minecraft and help troubleshoot most issues that can arise:

To get minecraft running, right click the minecraft.jar file, go to properties, permisions, and set it allow running as an executable. Now you can right click it, and run with a java.

If you want to properly have minecraft installed: have its icon, be able to launch with minecraft in terminal, show up on the applications menu, etc, follow these steps:

1) Download minecraft to ~/.minecraft

wget -P /home/$(whoami)/.minecraft https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar

2) Check which JavaVM is installed and which is set to default.

ls /usr/lib/jvm/
java -version

It is recommended to run minecraft with the latest stable java (7 aka 1.7) from Oracle, though running it with the open-source alternative OpenJDK works too.

If you have the one you want to use, OpenJDK 7 or Oracle Java 7, and it is NOT set as default, skip to step 4; if it is, skip to step 5.

3) Installing Java

To get Oracle Java 7, you need to first add a package repository repository that has it to download, refresh the package list, then download and install it, run

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update; sudo mkdir -p /usr/lib/mozilla/plugins
sudo apt-get install Oracle-java7-installer

To get OpenJDK 7, run

sudo mkdir -p /usr/lib/mozilla/plugins
sudo apt-get install openjdk-7-jre icedtea-7-pluginter

Next check again which is the default JavaVM using java -version

4) Change the default JavaVM

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

5) Extract and rename the Minecraft icon

unzip /home/$(whoami)/.minecraft/Minecraft.jar favicon.png -d /home/$(whoami)/.minecraft
mv /home/$(whoami)/.minecraft/favicon.png /home/$(whoami)/.minecraft/Minecraft.png

6) Create a launcher in /usr/local/games/ so you can run minecraft with just minecraft.

touch minecraft
echo "java -jar /home/$(whoami)/.minecraft/minecraft.jar" >> minecraft

Moving and changing permission of Minecraft shell script

sudo chmod +x minecraft
sudo mv minecraft /usr/local/games/

7) Install the minecraft icon to your system

xdg-desktop-icon install --novendor /home/$(whoami)/.minecraft/Minecraft.png
rm -rf Minecraft.png

8) Create a desktop launcher (shortcut) for Minecraft

touch 'Minecraft.desktop'
echo "[Desktop Entry]" >> Minecraft.desktop
echo "Version=1.0" >> Minecraft.desktop
echo "Name=Minecraft" >> Minecraft.desktop
echo "GenericName=Game" >> Minecraft.desktop
echo "Comment=Minecraft is a game about placing blocks to build anything you can imagine." >> Minecraft.desktop
echo "Exec=minecraft" >> Minecraft.desktop
echo "Terminal=false" >> Minecraft.desktop
echo "Icon=Minecraft"  >> Minecraft.desktop
echo "Categories=Game;Application;" >> Minecraft.desktop
echo "Type=Application" >> Minecraft.desktop
echo "StartupNotify=true" >> Minecraft.desktop
echo "Actions=RunInTerminal" >> Minecraft.desktop
echo "" >> Minecraft.desktop
echo "[Desktop Action RunInTerminal]" >> Minecraft.desktop
echo "Name=Run in Terminal" >> Minecraft.desktop
echo "Exec=sudo gnome-terminal -x minecraft" >> Minecraft.desktop

Granting the launcher executable permissions

sudo chmod +x Minecraft.desktop

Adding the shortcut to your application menu and adding it to your desktop

xdg-desktop-menu install --novendor Minecraft.desktop
xdg-desktop-menu forceupdate
mv Minecraft.desktop /home/$(whoami)/Desktop

Solution 4:

And to start minecraft use command java -jar /path/to/Minecraft.jar. If you want you can create desktop launcher for it so you dont need to start it from terminal every time.

Solution 5:

It's possible the problem is with some of the libraries he's using that he's using. But the bug should be fixed in a later version of the libraries. http://www.minecraftforum.net/viewtopic.php?f=17&t=57426 has a solution. In short:

Procedure:

  1. Make sure minecraft alpha has been run at least once so it can download the gamedata.
  2. Download the latest version of the game engine: http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.5/lwjgl-2.5.zip/download
  3. Open zip file in Archive Manager and open jar/ directory
  4. Navigate to the minecraft game data directory in nautilus: /home/user/.minecraft/bin
  5. Drag jinput.jar lwjgl.jar lwjgl_util.jar from the archive to the minecraft gamedata directory
  6. Open native/linux/ in the archive
  7. navigate to /home/user/.minecraft/bin/natives
  8. Drag everything from native/linux/ to /home/user/.minecraft/bin/natives
  9. Your done! Start the game!