MaxJavaStackTraceDepth gives error with jdk-9.0.4

Answered

Idea UI alerted me to an update this morning. Generally speaking I keep an up to date copy of the oracle jdk/jre on my system due to it being used by multiple JetBrains packages as well as arduino, processing, android and platformio. So rather than having half-a-dozen copies of either the jdk or jre around, whenever possible, I either download them without or remove the dist version and sym link in or otherwise rebuild the launch scripts to utilize the system wide version.

This morning I also got an alert that even the older version of idea-UI recommended a newer jre than I currently had on my system. Upon going to the Oracle website, it appears they are now naming them jdk-9.0.x rather than jdk1.x format and the jdk did not appear to come with a jre tree under it but instead the jre is in a separate package.

I have noted that some of the idea stuff while it reads 'jre64' is actually holding a copy of the jdk. So I tend to link them to the jdk version current on my system. No exception in this case. After updating to the jdk-9.0.4 I pointed idea to the appropriate folder and attempted to start using the idea.sh.

Right off the bat I got a notice about UseConcMarkSweepGC being deprecated in version 9.0 but got a fatal error on the MaxJavaStackTraceDepth being outside teh allowable range:

intx MaxJavaStackTraceDepth=-1 is outside the allowed range [ 0 ... 1073741823 ]
Improperly specified VM option 'MaxJavaStackTraceDepth=-1'
Error: Could not create the Java Virtual Machine.

Currently it is still on the splash screen with the loading bar all the way to the edge but has been sitting there a while. (not sure if it's still loading or not). I'll go grab the copy with a jdk for the time being, but did want to point out my problems with the 9.0.4

1
1 comment

IntelliJ IDEA is designed to run on Java 8. Using bundled runtime is highly recommended for multiple reasons. See https://intellij-support.jetbrains.com/hc/articles/206544879.

Running IntelliJ IDEA on Java 9 is highly experimental, not officially supported and should be used on your own risk at the moment.

Current IntelliJ IDEA version doesn't have MaxJavaStackTraceDepth VM option. It was probably migrated from your previous installation. You can remove it from the .vmoptions file in the IDE config directory, see https://intellij-support.jetbrains.com/hc/articles/206544869.

Default VM options for IntelliJ IDEA 2017.3.3 are as follows:

-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dide.no.platform.update=true
1

Please sign in to leave a comment.