[BUG] Use Java 8 for minecraft 1.12.2 and lower
Cs0ki opened this issue · comments
Hello!
This issue is popping up is due to using java version 15 by default which works fine for newer versions of Minecraft but causes problems in older versions. Plan of including a config to change this easily is expected soon (though is unfortunately getting regularly delayed because of my lack of time), but for now you can edit the following line and change 15
to 8
to fix the issue. Ignore any warnings that say that you are using java 8 instead of 15
. It should function correctly.
PS: factory reset the runtime if any problems persist. Don't worry, this won't delete any world data.
Remove everything after # Update the package lists
to the line before # Mount drive
and replace with
# Update the package lists
!sudo apt update &>/dev/null && echo "apt cache successfully updated" || echo "apt cache update failed, you might receive stale packages"
# Install OpenJDK 8
!sudo apt-get install openjdk-8-jdk &>/dev/null && echo "Yay! Openjdk8 has been successfully installed." || echo "Failed to install OpenJdk8."
#Perform java version check
java_ver = !java -version 2>&1 | awk -F[\"\.] -v OFS=. 'NR==1{print $2}'
!sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
!export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
!export PATH=$PATH:$JAVA_HOME
print(java_ver)
And it should work.
@infinitygamer404 's solution should work. Minecraft 1.12 is incompatible with java 15
@Cs0ki there ya go