jsegaert / iocage-plugin-mineos

Artifact file(s) for MineOS iocage plugin
6 stars 5 forks source link

updating javajdk version to 17 for MC 1.18 #6

Closed rick2909 closed 2 years ago

rick2909 commented 2 years ago

My 1.18 server can't start due to not having java JDK version 17. I have followed what is being explained here but when doing ln -sf /opt/jdk-17.0.1/bin/java /usr/bin/java I get /usr/bin/java: Read-only file system.

Since you are the owner of the jail, I thought that I should post it in this repo if not close it and I will post it in the mineOS forums/repo.

jsegaert commented 2 years ago

The link you referenced is very Linux-centric, where the MineOS plugin runs on FreeBSD.

There are several links in the upstream repo and in the TrueNAS forums that document this issue and provide a solution, e.g.:

In summary, you need to install Java 16 in your plugin jail by running the command pkg install openjdk16 and then for any 1.18 Minecraft servers, indicate the proper version of Java to use in the server.config file (located in /var/games/minecraft/servers//server.config) by setting/changing the value java_binary=/usr/local/openjdk16/bin/java.

Note that if you do not run any "legacy" servers but only 1.18 servers, as an alternative you can just uninstall the older Java versions. If there is only one version of Java installed, there's no need to set that java_binary= property.
In that case, you can also chose to reinstall or update the plugin, as the latest version of the plugin is installing openJDK16. That being said, some "Forge" mods that use sqlite may run into some SQL errors with the latest packages and Java version. There's a thread in the TrueNAS forums for this also.