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,

RiceAlex

Member
Newcomer
Joined
May 6, 2019
Messages
17
Trophies
0
Age
26
XP
90
Country
China
the version of LWJGL you compile is 2.X or 3.X? Minecraft had moved their backend from LWJGL2 to LWJGL3 since 1.13.X , I only got LWJGL2 natives compiled,how is yours?
 

OverkillLabs

Well-Known Member
OP
Newcomer
Joined
Jan 26, 2019
Messages
45
Trophies
0
Age
34
XP
301
Country
Bulgaria
the version of LWJGL you compile is 2.X or 3.X? Minecraft had moved their backend from LWJGL2 to LWJGL3 since 1.13.X , I only got LWJGL2 natives compiled,how is yours?

Mine is also only LWJGL2 hence why Minecraft up till version 1.12.2 runs only.
 

RiceAlex

Member
Newcomer
Joined
May 6, 2019
Messages
17
Trophies
0
Age
26
XP
90
Country
China
With sudo jetson_clocks it should work like this,btw fullscreen is broken in the version above 1.7.X , It will draw a 720x1280 framebuffer while the screen is 1280x720.
 

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,461
Trophies
1
Location
127.0.0.1
XP
3,114
Country
Japan
With a new world 80+ fps, I think.

tested about 40fps barely playable
Hm...I wouldn't agree that 40fps is "barely playable" considering a lot of games in Horizon run at ~30 but I digress. Interesting. I'm wondering how much you could squeeze out of a FTB pack with or without overclocking. Very interested in trying this with Sky Factory, for example, but I don't have a spare SD card on hand for L4T.
 

OverkillLabs

Well-Known Member
OP
Newcomer
Joined
Jan 26, 2019
Messages
45
Trophies
0
Age
34
XP
301
Country
Bulgaria
In my tests I usually get 60fps when there's not a lot of huge buildings or crazy stuff happening(With Optifine)
 

Alex S

Creator Of WWHDM, And Metroid Fusion XER0X!
Member
Joined
May 2, 2016
Messages
695
Trophies
0
Location
Hell
Website
www.erm.wut
XP
1,002
Country
United States
is anyone else getting this when they go to compile lwjgl?
i get this output right after running ant compile_native and any help would be wonderful.


compile:
[core] Compiling 249 source files to /home/alexs2412/lwjgl/bin
[core] warning: [options] bootstrap class path not set in conjunction with -source 5
[core] error: Source option 5 is no longer supported. Use 6 or later.
[core] error: Target option 1.5 is no longer supported. Use 1.6 or later.
BUILD FAILED
/home/switch/lwjgl/build.xml:465: Compile failed; see the compiler error output for details.
 

OverkillLabs

Well-Known Member
OP
Newcomer
Joined
Jan 26, 2019
Messages
45
Trophies
0
Age
34
XP
301
Country
Bulgaria
is anyone else getting this when they go to compile lwjgl?
i get this output right after running ant compile_native and any help would be wonderful.


compile:
[core] Compiling 249 source files to /home/alexs2412/lwjgl/bin
[core] warning: [options] bootstrap class path not set in conjunction with -source 5
[core] error: Source option 5 is no longer supported. Use 6 or later.
[core] error: Target option 1.5 is no longer supported. Use 1.6 or later.
BUILD FAILED
/home/switch/lwjgl/build.xml:465: Compile failed; see the compiler error output for details.

Uninstall everything java related and reinstall it then it should fix itself and compile properly.
 

RiceAlex

Member
Newcomer
Joined
May 6, 2019
Messages
17
Trophies
0
Age
26
XP
90
Country
China
erm... i uninstalled everything the tutorial installs and tried again and its the exact same issue.
to compile LWJGL you need some dependecies
Code:
sudo apt-get install libxcursor-dev # X cursor management library (development files)
sudo apt-get install libxxf86vm-dev # X11 XFree86 video mode extension library (development headers)
sudo apt-get install libxrandr-dev  # X11 RandR extension library (development headers)
sudo apt-get install libxt-dev      # X11 Toolkit Intrinsics library (development headers)

and you must edit the build.xml:
Before we compile, there is a bug in the LWJGL linux build that we need to fix first. In the file platform_build/linux_ant/build.xml you need to change this line (near the top):

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
to be this instead: (just changing the i386 to aarch64)

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/aarch64 -ljawt" />
These are some compilation flags that ant passes to gcc when compiling.

do same to the next line "libs64"

--------------------- MERGED ---------------------------

Hm...I wouldn't agree that 40fps is "barely playable" considering a lot of games in Horizon run at ~30 but I digress. Interesting. I'm wondering how much you could squeeze out of a FTB pack with or without overclocking. Very interested in trying this with Sky Factory, for example, but I don't have a spare SD card on hand for L4T.
The framerate is on the fly, the max is 40 fps most time it it is under 30 if you don't sudo jetson_clocks
 
Last edited by RiceAlex,

Alex S

Creator Of WWHDM, And Metroid Fusion XER0X!
Member
Joined
May 2, 2016
Messages
695
Trophies
0
Location
Hell
Website
www.erm.wut
XP
1,002
Country
United States
to compile LWJGL you need some dependecies
Code:
sudo apt-get install libxcursor-dev # X cursor management library (development files)
sudo apt-get install libxxf86vm-dev # X11 XFree86 video mode extension library (development headers)
sudo apt-get install libxrandr-dev  # X11 RandR extension library (development headers)
sudo apt-get install libxt-dev      # X11 Toolkit Intrinsics library (development headers)

and you must edit the build.xml:
Before we compile, there is a bug in the LWJGL linux build that we need to fix first. In the file platform_build/linux_ant/build.xml you need to change this line (near the top):

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
to be this instead: (just changing the i386 to aarch64)

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/aarch64 -ljawt" />
These are some compilation flags that ant passes to gcc when compiling.

do same to the next line "libs64"

--------------------- MERGED ---------------------------


The framerate is on the fly, the max is 40 fps most time it it is under 30 if you don't sudo jetson_clocks

problem is the compiler uses Buildfile: /home/switch/lwjgl/build.xml

and not what you pointed to.
 

Craftyawesome

Well-Known Member
Member
Joined
Feb 3, 2018
Messages
173
Trophies
0
XP
915
Country
United States
erm... i uninstalled everything the tutorial installs and tried again and its the exact same issue.

No, you have to uninstall java (11?) and reinstall java 8. Follow
https://askubuntu.com/questions/84483/how-to-completely-uninstall-java
And restart the tutorial from the beginning.

to compile LWJGL you need some dependecies
Code:
sudo apt-get install libxcursor-dev # X cursor management library (development files)
sudo apt-get install libxxf86vm-dev # X11 XFree86 video mode extension library (development headers)
sudo apt-get install libxrandr-dev  # X11 RandR extension library (development headers)
sudo apt-get install libxt-dev      # X11 Toolkit Intrinsics library (development headers)

and you must edit the build.xml:
Before we compile, there is a bug in the LWJGL linux build that we need to fix first. In the file platform_build/linux_ant/build.xml you need to change this line (near the top):

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
to be this instead: (just changing the i386 to aarch64)

<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/aarch64 -ljawt" />
These are some compilation flags that ant passes to gcc when compiling.

do same to the next line "libs64"/
Either I accidentally compiled with that change, or it isn't required with OP's compiling method.
I don't know if libx11-dev and xorg-dev contain the dependencies you mentioned, I probably had both.
 

Alex S

Creator Of WWHDM, And Metroid Fusion XER0X!
Member
Joined
May 2, 2016
Messages
695
Trophies
0
Location
Hell
Website
www.erm.wut
XP
1,002
Country
United States
No, you have to uninstall java (11?) and reinstall java 8. Follow
https://askubuntu.com/questions/84483/how-to-completely-uninstall-java
And restart the tutorial from the beginning.

i am using java 8 right now
No, you have to uninstall java (11?) and reinstall java 8. Follow
https://askubuntu.com/questions/84483/how-to-completely-uninstall-java
And restart the tutorial from the beginning.

you didnt show how to install java 8... the guide installs java 11
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    It could get banned from PSN but you can change your ID I think?
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    K3Nv2 @ K3Nv2: Did you try wearing them?