OS Name/Version: Ubuntu 22.04 LTS
Product Name/Version: AMP 2.5.1.2 - 20240724.5
Problem Description:
We have an existing server with ATM9-To The Sky modpack and its associated server files. We are unable to locate which jar file the modpack is using as its server jar, because the start scripts do not reference a server jar.
Script contents:
the associated line is:
"${ATM9_JAVA:-java}" @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-$FORGE_VERSION/unix_args.txt nogui
jvm args contains the memory max variable, so we can ignore that. The other one, however is the one we’re confused at because no where in that other args file references the actual Forge-version-server.jar or Forge-version-universal.jar
See below for the unix_args.txt file it is referencing.
Actions taken to resolve so far:
Examined scripts and files to find the jar so we can add the jar to the root of the instance folder and have AMP take it.
We’re not sure how to configure the settings in AMP to get the below to run properly with the forge server jar we found.
-p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.10/securejarhandler-2.1.10.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.19/JarJarFileSystems-0.3.19.jar
--add-modules ALL-MODULE-PATH
--add-opens java.base/java.util.jar=cpw.mods.securejarhandler
--add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler
--add-exports java.base/sun.security.util=cpw.mods.securejarhandler
--add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming
-Djava.net.preferIPv6Addresses=system
-DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.10.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.19.jar
-DlibraryDirectory=libraries
-DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.10/securejarhandler-2.1.10.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.5/eventbus-6.0.5.jar:libraries/net/minecraftforge/forgespi/7.0.1/forgespi-7.0.1.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.9/modlauncher-10.0.9.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/net/minecraftforge/mergetool/1.1.5/mergetool-1.1.5-api.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.6.3/typetools-0.6.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.19/JarJarSelector-0.3.19.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.19/JarJarMetadata-0.3.19.jar:libraries/net/minecraftforge/fmlloader/1.20.1-47.2.20/fmlloader-1.20.1-47.2.20.jar:libraries/net/minecraft/server/1.20.1-20230612.114412/server-1.20.1-20230612.114412-extra.jar:libraries/com/github/oshi/oshi-core/6.2.2/oshi-core-6.2.2.jar:libraries/com/google/code/gson/gson/2.10/gson-2.10.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar:libraries/com/mojang/authlib/4.0.43/authlib-4.0.43.jar:libraries/com/mojang/brigadier/1.1.8/brigadier-1.1.8.jar:libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar:libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.82.Final/netty-buffer-4.1.82.Final.jar:libraries/io/netty/netty-codec/4.1.82.Final/netty-codec-4.1.82.Final.jar:libraries/io/netty/netty-common/4.1.82.Final/netty-common-4.1.82.Final.jar:libraries/io/netty/netty-handler/4.1.82.Final/netty-handler-4.1.82.Final.jar:libraries/io/netty/netty-resolver/4.1.82.Final/netty-resolver-4.1.82.Final.jar:libraries/io/netty/netty-transport/4.1.82.Final/netty-transport-4.1.82.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.82.Final/netty-transport-classes-epoll-4.1.82.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.82.Final/netty-transport-native-epoll-4.1.82.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.82.Final/netty-transport-native-unix-common-4.1.82.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.9/fastutil-8.5.9.jar:libraries/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar:libraries/net/java/dev/jna/jna-platform/5.12.1/jna-platform-5.12.1.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar:libraries/org/joml/joml/1.10.5/joml-1.10.5.jar:libraries/org/slf4j/slf4j-api/2.0.1/slf4j-api-2.0.1.jar
cpw.mods.bootstraplauncher.BootstrapLauncher
--launchTarget forgeserver
--fml.forgeVersion 47.2.20
--fml.mcVersion 1.20.1
--fml.forgeGroup net.minecraftforge
--fml.mcpVersion 20230612.114412
The actual startserver.sh file that we use to launch the server is below:
#!/bin/sh
set -eu
FORGE_VERSION=47.2.20
# To use a specific Java runtime, set an environment variable named ATM9_JAVA to the full path of java.exe.
# To disable automatic restarts, set an environment variable named ATM9_RESTART to false.
# To install the pack without starting the server, set an environment variable named ATM9_INSTALL_ONLY to true.
ATM9_JAVA="/opt/minecraft/jdk-17.0.12+7/bin/java"
INSTALLER="forge-1.20.1-$FORGE_VERSION-installer.jar"
FORGE_URL="https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-$FORGE_VERSION/forge-1.20.1-$FORGE_VERSION-installer.jar"
pause() {
printf "%s\n" "Press enter to continue..."
read ans
}
if ! command -v "${ATM9_JAVA:-java}" >/dev/null 2>&1; then
echo "Minecraft 1.20.1 requires Java 17 - Java not found"
pause
exit 1
fi
cd "$(dirname "$0")"
if [ ! -d libraries ]; then
echo "Forge not installed, installing now."
if [ ! -f "$INSTALLER" ]; then
echo "No Forge installer found, downloading now."
if command -v wget >/dev/null 2>&1; then
echo "DEBUG: (wget) Downloading $FORGE_URL"
wget -O "$INSTALLER" "$FORGE_URL"
else
if command -v curl >/dev/null 2>&1; then
echo "DEBUG: (curl) Downloading $FORGE_URL"
curl -o "$INSTALLER" -L "$FORGE_URL"
else
echo "Neither wget or curl were found on your system. Please install one and try again"
pause
exit 1
fi
fi
fi
echo "Running Forge installer."
"${ATM9_JAVA:-java}" -jar "$INSTALLER" -installServer
fi
if [ "${ATM9_INSTALL_ONLY:-false}" = "true" ]; then
echo "INSTALL_ONLY: complete"
exit 0
fi
JAVA_VERSION=$("${ATM9_JAVA:-java}" -fullversion 2>&1 | awk -F '"' '/version/ {print $2}' | cut -d'.' -f1)
if [ ! "$JAVA_VERSION" -ge 17 ]; then
echo "Minecraft 1.20.1 requires Java 17 - found Java $JAVA_VERSION"
pause
exit 1
fi
while true
do
"${ATM9_JAVA:-java}" @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-$FORGE_VERSION/unix_args.txt nogui
if [ "${ATM9_RESTART:-true}" = "false" ]; then
exit 0
fi
echo "Restarting automatically in 10 seconds (press Ctrl + C to cancel)"
sleep 10
done