Tutorial  Updated

How To Play Minecraft Java Edition On L4T Linux [Tutorial]

For this tutorial you need to have L4T Linux set up and updated.

This is a simple guide(as simple as I could make it) to installing all necessary things to get Minecraft Java Edition up and running.

I basically compiled a full version of various different tutorials I found scattered around that I used to make Minecraft work and play normally.


  • Open Terminal
  • Type all of the following stuff in Terminal

Code:
sudo apt update
  • Install the following dependencies:
Code:
sudo apt install openjdk-8-jdk
sudo apt install gradle openjdk-8-jdk libx11-dev xorg-dev
  • Soft link libjawt
Code:
sudo ln -s /usr/lib/jvm/java-8-openjdk-arm64/lib/aarch64/libjawt.so /usr/lib/libjawt.so
  • Compile LWJGL
Code:
git clone https://github.com/LWJGL/lwjgl
cd lwjgl
ant generate-all
ant compile_native
  • Copy Binaries
Code:
mkdir -p ~/.minecraft/natives
cp ~/lwjgl/libs/linux/liblwjgl.so ~/.minecraft/natives/
cp ~/lwjgl/libs/linux/libopenal.so ~/.minecraft/natives/
  • Setup environment variable (you need to run this command in terminal every time you close terminal and re-open it to launch Minecraft again otherwise the game will crash)
Code:
export _JAVA_OPTIONS='-Djava.library.path=/home/YOURUSERNAME/.minecraft/natives/'
  • Play Minecraft
Code:
wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
java -jar Minecraft.jar

  • Use your Minecraft Account to Login to the launcher
  • Choose the version you want to play in settings (has to be Minecraft 1.12.2 or lower, newer versions make the game crash)
  • Click Play and if you did everything right it should launch and play without a problem
  • NOTE: If you want to use Optifine with it just download the Optifine jar for your version (again 1.12.2 or lower) and run the following command and click install:
Code:
java -jar Optifine(version number).jar
  • Then when you start the Minecraft launcher again a new profile should come up named Optifine, just start Minecraft with that profile instead of your other one.
  • Also apparently if you type into Terminal "sudo jetson_clocks" it will give you more fps ingame? Not tested it yet.
 
Last edited by OverkillLabs,

IchKlaueDeinWlan

New Member
Newbie
Joined
May 15, 2020
Messages
1
Trophies
0
Age
23
XP
35
Country
Germany
If I press the left Alt or Windows key in full screen mode, my switch freezes and I can only move my mouse, then my switch has to be restarted. (only happens in fullscreen) and without fullscreen I have arround 15fps

@2,09Ghz
lowest possible video settings
mods: optifine, forge and better fps
version: 1.8.9
 

Swampat

The swamp monster that pats the ground
Member
Joined
May 25, 2017
Messages
238
Trophies
0
Age
27
XP
230
Country
United States
I don't know if this thread is dead or not but for some reason I'm stuck on preparing in the launcher. It launched fine last night but now it's stuck.
 

The Official GMan

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
48
Trophies
0
XP
339
Country
United States
  • Like
Reactions: Swampat

Swampat

The swamp monster that pats the ground
Member
Joined
May 25, 2017
Messages
238
Trophies
0
Age
27
XP
230
Country
United States

leon315

POWERLIFTER
Member
Joined
Nov 27, 2013
Messages
4,097
Trophies
2
Age
124
XP
4,075
Country
Italy
oR just play in virtual machine, even a potato pc can run it smoothly, the 1.16 is far superior with tons of new items
 

The Official GMan

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
48
Trophies
0
XP
339
Country
United States
I have this setup but it keeps crashing everytime I try loading anything over 1.12.2. I don't know why it keeps crashing.
You must have missed this part "
Step 3: Selecting your LWJGL version
Now, you need to choose a LWJGL version. The options are 2 or 3. If you plan on using Minecraft 1.13+, choose 3. If you plan on using Minecraft 1.12.2 or below, choose 2. You can change this at any time."
 
  • Like
Reactions: Swampat

The Official GMan

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
48
Trophies
0
XP
339
Country
United States
I got the MultiMC launcher to work. This is mostly pulled from the MultiMC build documentation. To build it run:

Code:
git clone (MultiMC5 git repo on github I cant post links)
cd MultiMC5
git submodule init
git submodule update
sudo apt install gcc qt5-default cmake zlib1g-dev openjdk-8-jdk libgl1-mesa-dev
mkdir build
mkdir install
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j4 install

To run MultiMC:
Code:
cd ../install
./MultiMC

To run Minecraft in MultiMC it does not accept the java libraries path argument (it just ignores it) but if you stop the java process immediately and replace the natives in the instance dir/natives, and then resume the java process it will launch. I created a set of python scripts to do this automatically, but they wont work if other java programs are running, and will crash if the instance is running for the first time, because the first time you launch a MultiMC instance it create a file that it need to read to find the lwjgl version. Just add:

Code:
python3 WHEREVER_THE_SCRIPTS_ARE/copynativeslauncher.py $INST_DIR

to the custom commands Pre-launch command and it will run on launch. In the folder with the scripts there is a conf.json file to specify the lwjgl paths. If you are only planning on using one lwjgl version, you can remove the other one leave it as the default or blank.

Also if anyone knows how to fix the lwjgl3 error:
Code:
[Client thread/INFO]: [STDERR]: [LWJGL] [ERROR] Incompatible Java and native library versions detected.
Possible reasons:
   a) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.
   b) The classpath contains jar files of an older LWJGL version.
Possible solutions:
   a) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make
      sure the folder it points to contains the shared libraries of the correct LWJGL version.
   b) Check the classpath and make sure to only have jar files of the same LWJGL version in it.

For using controllers in Minecraft you can use QJoyPad. To install it:
Code:
sudo apt install qjoypad

And to run it:
Code:
qjoypad --notray
did you ever find a cleaner way of doing this? why is it that we can't load custom java libraries?
 

1B51004

Well-Known Member
Member
Joined
Nov 23, 2020
Messages
413
Trophies
1
XP
2,200
Country
United States
why is this under the switch forum
unless it is for switch?
edit: nevermind i am the stupidest person on this planet
gud stuff, probably
 
Last edited by 1B51004,

The Official GMan

Well-Known Member
Newcomer
Joined
Jan 16, 2016
Messages
48
Trophies
0
XP
339
Country
United States
since people are still coming here for info... DO NOT USE the instructions from the OP

use the L4T-Megascript (now included as part of L4T Switchroot 3.4.0 in your applications folder) to install MultiMC5 (with a custom automatically updating meta repo)
no fuss with all release mincraft versions, has microsoft account support, sound should work fine, etc
https://github.com/cobalt2727/L4T-Megascript/wiki

In theory this should work on any ARM64 linux device (though only nintendo switch and jetson nano have been tested)
 
Last edited by The Official GMan,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up