I am using Ubuntu Server to host multiple Minecraft servers. For the latest versions of Minecraft, I need the latest version of Java; however, I would like to run a modded server as well and some of the mods are incompatible with the newest version of Java. How can I run the modded server using Java version 15 while running the other servers using the newest version? I am fairly new to Ubuntu Server so any help would be much appreciated.
1 Answer
I believe you could run the java executable located in (I think) /usr/lib/jvm/java-(version)-(vendor)/bin/java
the same way you'd just use the java
link.
You'd still need to install the correct jvm version.
-
How would I do that? Sorry if this is a stupid question. Can I run multiple versions by adding something to the command to start the server? Almost like adding a command-line argument? I'm sorry, I don't follow. Jan 2, 2022 at 0:22
-
1Instead of doing
java -jar minecraft.jar
, you'd just replace thejava
with the path of the java 8 executable, for example with OpenJDK 8,/usr/lib/jvm/java-8-openjdk/bin/java -jar minecraft.jar
Jan 2, 2022 at 0:24 -
1You could java anywhere you have downloaded it, not just
/us/lib/jvm
. Just run/anywhere/bin/java -jar minecraft.jar
– RedbobJan 4, 2022 at 18:12
java
command it defaults to the system default jdk does it not? I'm new to this so maybe I'm wrong.zulu
,temurin
,liberica
...etc, then have a folder that contains any version javas you need. Or using java version manager to mange javas, or using server management tool to add/specify java per server.