Where do I put this?

I tried adding --enable-native-access=spark to the startup args but I just get
WARNING: Unknown module: spark specified to --enable-native-access
WARNING: Unknown module: spark specified to --enable-native-access
when I add it.
No description
6 Replies
Tamz
Tamz3mo ago
show your startup args on how you added it
MarijnIsN00B
MarijnIsN00BOP3mo ago
Using the standard Forge startup scripts This is run.sh
#!/usr/bin/env sh
# Forge requires a configured set of both JVM and program arguments.
# Add custom JVM arguments to the user_jvm_args.txt
# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or
# pass them to this script directly
"/home/marijn/.sdkman/candidates/java/24.0.1-graal/bin/java" @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.4.0/unix_args.txt -nogui "$@"
#!/usr/bin/env sh
# Forge requires a configured set of both JVM and program arguments.
# Add custom JVM arguments to the user_jvm_args.txt
# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or
# pass them to this script directly
"/home/marijn/.sdkman/candidates/java/24.0.1-graal/bin/java" @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.4.0/unix_args.txt -nogui "$@"
And this is user_jvm_args.txt
# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M

# A good default for a modded server is 4GB.
# Uncomment the next line to set it.
-Xmx10G -XX:+UnlockExperimentalVMOptions --enable-native-access=spark --enable-native-access=com.sun.jna -XX:+UseZGC -XX:+ZGenerational -XX:+AlwaysPreTouch -XX:+UseFastUnorderedTimeStamps -Xlog:async
# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M

# A good default for a modded server is 4GB.
# Uncomment the next line to set it.
-Xmx10G -XX:+UnlockExperimentalVMOptions --enable-native-access=spark --enable-native-access=com.sun.jna -XX:+UseZGC -XX:+ZGenerational -XX:+AlwaysPreTouch -XX:+UseFastUnorderedTimeStamps -Xlog:async
Tamz
Tamz3mo ago
try doing 1 dash instead of 2
MarijnIsN00B
MarijnIsN00BOP3mo ago
Using GraalVM 24.0.1 Will do Then I just get a fatal error Unrecognised option
Tamz
Tamz3mo ago
Ah that might be why Graal might not have the compatability for that
MarijnIsN00B
MarijnIsN00BOP3mo ago
Well it seems to recognise the command, just not the module itself I'll give it a go with Adoptium That seems to have done the trick ig Thanks

Did you find this page helpful?