Reputation: 8955
I am using IntelliJ 2020.1 Ultimate and have a JBoss 7.0.2 server that I want to run from IntelliJ.
I have added it as a configuration:
But when I try start the server, I get the following error:
IDEA.app/Contents/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/lib/kotlin-stdlib.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/lib/kotlin-reflect.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/Kotlin/lib/kotlin-plugin.jar" org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 64088 4a7ed3b5-cfb6-4196-b997-396c16d8c06f /Users/richardmarais/Library/Caches/JetBrains/IntelliJIdea2020.1/compile-server Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2 -Xmx2048m -XX:MaxPermSize=1024m -Xms2048m OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size
My idea.vmoptions
are the default values:
-Xms128m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
Question
Do you know how I can fix the above error to get JBoss to start?
Upvotes: 0
Views: 1257
Reputation: 402423
You don't need to set any global environment variables to patch the VM options.
Unset JAVA_TOOL_OPTIONS
and specify the proper VM Options in the Run/Debug configuration for the server:
-Xms256m -Xmx2048m -XX:MaxPermSize=512m
It should be more than enough for any project. I doubt that you really need 5GB initial heap size.
Also note that IntelliJ IDEA .vmoptions
doesn't affect the options for the apps that you start from the IDE.
Upvotes: 1
Reputation: 8955
I fixed this by doing this.
open -a TextEdit.app ~/.bash_profile
then:
export JAVA_TOOL_OPTIONS="-Dhttps.protocols=TLSv1.2 -Xmx4096m -Xms128m"
Upvotes: 0