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
338
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
338
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
338
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
338
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.
  • The Real Jdbye @ The Real Jdbye:
    the vram is one advantage when it comes to AI but ends up being slower even with that and really AI is the only use case that needs more than 12gb vram right now
  • Psionic Roshambo @ Psionic Roshambo:
    Interesting lol
  • Psionic Roshambo @ Psionic Roshambo:
    I think I watched a video where two games at 4K where eating just over 16GB of RAM and it's the one case where the 7900XT and XTX pulled ahead (minus RTX of course)
  • Psionic Roshambo @ Psionic Roshambo:
    So my opinion is that they could age a bit better in the future, and maybe AMD will continue improving them via drivers like they tend to do. No guarantee there but they have done it in the past. Just a feeling I have.
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
    Psionic Roshambo @ Psionic Roshambo: @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to...