[solved] Debian (arm): FtB Infinity Evo Server - Java Problems

  • Tech Support section is for getting help with FTB related problems. If there's a repeatable issue that can be labeled as a bug, then please use the issue tracker for the pack or the app at GitHub issue trackers - If there's no repository for a pack that means that the pack is old and/or will not be updated. Bugs for older packs will not be fixed, unless they are critical.
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Gladdle

New Member
May 16, 2021
3
0
2
Germany, Baden Württemberg
Hi Community, i have problems to run a Feed the Beast Infinity Evolved 3.0.2 Server on my Debian System. It's NOT the once Java Application i use, so i have to start the server with a specific Version, but that's my problem. My "update-alternatives --config java" shows the following output:
Code:
Es gibt 3 Auswahlmöglichkeiten für die Alternative java (welche /usr/bin/java bereitstellen).

  Auswahl      Pfad                                                    Priorität Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-arm64/bin/java              1111      automatischer Modus
  1            /usr/lib/jvm/adoptopenjdk-8-hotspot-arm64/bin/java       1081      manueller Modus
  2            /usr/lib/jvm/adoptopenjdk-8-hotspot-jre-arm64/bin/java   1081      manueller Modus
  3            /usr/lib/jvm/java-11-openjdk-arm64/bin/java              1111      manueller Modus

My system is not in english, i am sorry for that. I have edited the "ServerStart.sh", now it begins with:
Code:
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-jre-arm64
export JAVACMD=/usr/lib/jvm/adoptopenjdk-8-hotspot-jre-arm64/bin/java

But that won't work. I have also edited the part with "start_server()":
Code:
start_server() {
    $JAVACMD -version
    "$JAVACMD" -server -Xms2048M -Xmx4096M -XX:PermSize=256M -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:+UseG1GC -jar FTBServer-1.7.10-1614.jar nogui
}

But if i start the Server with "sudo -u minecraft /opt/minecraft-server/FTB-Infinity-Server/ServerStart.sh" he shows me the java11 version. How can i start (only) this script with Java 8? I have googled a lot, but maybe i didn't use the correct keywords. Maybe someone can help me or give me a useful Link?
 

druuhl

New Member
Jul 31, 2020
10
0
2
Full qualyfied path of Java, not the system provided one

change this line

- java -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M -jar forge-1.16.5-36.1.4.jar nogui

to this

/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx6144M -Xms4096M -jar forge-1.16.5-36.1.4.jar nogui

so there is no problem with more than oneinstalled java versions. With linux every with apt installed java version changes the alternatives, means the systemwide used java version. With full path, this is ignored.
 

Gladdle

New Member
May 16, 2021
3
0
2
Germany, Baden Württemberg
I have solved the problem by my own.
For those, who are use google like me and find this thread:

This is NOT a tutorial, you have to know what you are doing! So i don't wrote down every cmd!

Feed the Beast Infinity Evolved 3 doesn't work with adoptoopenjdk (maybe yes, i found that information on a few websites, but found not one working solution), it need's the one from oracle: search for "oracle jdk 1.8" and maybe your cpu architecture. Now you find the download link somewhere on oracle.com. Download the tar.gz file, extract it to /usr/lib/jvm (maybe it's different on your Linux Distribution. If you aren't sure use the /opt path - opt means "optional software"). I have renamed the path so in MY case the JAVACMD is:
/usr/lib/jvm/oracle-jdk-1.8.0_291/bin/java
If you have choosen the other path it's something like
/opt/oracle-jdk-1.8.0_291/bin/java

If you use a init.d script (like me, got mine from the fandom wiki) you have to add the following line on the settings:
Code:
JAVACMD="/usr/lib/jvm/oracle-jdk-1.8.0_291/bin/java"
And then EDIT the "INVOCATION" Line to:
Code:
INVOCATION="$JAVACMD -server -Xmx${MAXHEAP}M -Xms${MINHEAP}M -XX:+UseConcMarkSweepGC \
 -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts \
 -jar $SERVICE $OPTIONS"
Be sure, that the JAVACMD is above INVOCATION!



If you are using the ServerStart.sh file, EDIT the file "settings.sh" and edit the "export JAVACMD=" to YOUR downloaded java file.
Now edit the ServerStart.sh and search for "start_server". Change the $JAVACMD Line for Oracle Java 1.8 to:
Code:
    "$JAVACMD" -server -Xms2048M -Xmx4096M -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10  -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -jar FTBServer-1.7.10-1614.jar nogui
Start the server - but NOT AS ROOT - it will work.