Kron4ek / minecraft-vortex-launcher

Fast, lightweight and easy to use Minecraft launcher
GNU General Public License v3.0
306 stars 30 forks source link

How to run launcher with several jvm on linux? #73

Closed ghost closed 1 year ago

ghost commented 1 year ago

I have installed several jvms. These are versions 1.8.0 and 17. Then I created a script (launcher-with-custom-options) to launch minecraft-vertex-launcher with java version 1.8

#!/bin/env bash
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.fc 37.x86_64
exec /path/to /bin/application "$@"

but when running the script through the console

./launcher-with-custom-options

the error message remains

Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
openjdk version "17.0.4.1" 2022-08-12
OpenJDK Runtime Environment (Red_Hat-17.0.4.1.1-3.fc37) (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.1.1-3.fc37) (build 17.0.4.1+1, mixed mode, sharing)
Kron4ek commented 1 year ago

In the launcher settings enable "Use custom Java" and specify the path to the Java binary you want to use.

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.fc37.x86_64/jre/bin/java
ghost commented 1 year ago

Oh, yeah. Thanks!