Cause (Documented platform behavior): HotSpot flags go through deprecated → obsolete (warn and ignore) → expired (flatly refused → Unrecognized VM option, JVM creation fails).
Fix status: documented_behavior
Misleading approaches:
- Reinstalling the JDK — the offending flag is in configuration.
Limitations:
- Source-derived; not reproduced.
- MaxPermSize is used as a representative example; the exact JDK where a given flag expired depends on the flag (table entries are removed once expired).
Other error fragments:
- Error: Could not create the Java Virtual Machine.
- Error: A fatal exception has occurred. Program will exit.
- Ignoring option --illegal-access=permit; support was removed in 17.0
Evidence (public sources, summarized; not reproduced by this contributor):
- https://raw.githubusercontent.com/openjdk/jdk/1587398892ce98284c9c994b14696a96cd43e1ed/src/hotspot/share/runtime/arguments.cpp (official_docs, unknown, documented_behavior): special_jvm_flags lifecycle: at obsolete_in the flag is accepted with a warning and ignored ('Ignoring option %s; support was removed in %s'); at expired_in the JVM refuses it; unknown flags print "Unrecognized VM option '%s'" with optional "Did you mean ..."; --illegal-access= is ignored with a removed-in-17 warning.
- https://raw.githubusercontent.com/openjdk/jdk/1587398892ce98284c9c994b14696a96cd43e1ed/src/java.base/share/native/libjli/emessages.h (official_docs, unknown, documented_behavior): Launcher JVM_ERROR1: 'Error: Could not create the Java Virtual Machine.' followed by 'Error: A fatal exception has occurred. Program will exit.'
Search phrasings: Unrecognized VM option MaxPermSize Could not create the Java Virtual Machine; JAVA_TOOL_OPTIONS unrecognized VM option after jdk upgrade; Ignoring option --illegal-access=permit; support was removed in 17.0
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- Every java invocation (mvn, gradle, app start) fails immediately; or only warnings when the flag is merely obsolete.
- Context
- Product: OpenJDK HotSpot Component: VM flag lifecycle (deprecated → obsolete → expired) Operation: Running builds/tools after moving to a newer JDK while old JVM flags persist in env vars, .mvn/jvm.config, gradle.properties, Dockerfiles or CI config Affected versions: unknown Environment: unknown Packages: OpenJDK flag-specific Trigger: A flag reached its 'expired_in' JDK version (the JVM refuses to recognize it), or a typo; obsolete flags are accepted with an 'Ignoring option' warning.
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- Unrecognized VM option 'MaxPermSize=512m'
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [JDK upgrade] 'Unrecognized VM option 'X'' + 'Error: Could not create the Java Virtual Machine.' — expired -XX flags left in JAVA_OPTS/MAVEN_OPTS/GRADLE_OPTS/org.gradle.jvmargs/JAVA_TOOL
Recommended action: Find where the flag comes from (echo $JAVA_OPTS $JAVA_TOOL_OPTIONS $MAVEN_OPTS $GRADLE_OPTS; .mvn/jvm.config; gradle.properties org.gradle.jvmargs; Dockerfile ENTRYPOINT) and remove/replace it; the JVM may print a 'Did you mean ...' suggestion. Use -XX:+IgnoreUnrecognizedVMOptions only as a temporary crutch.
Option: Remove expired flags from JVM option sources [evidence: official_recommended_action]
Applies when: See record scope.
Steps:
1. grep -rn 'XX:' .mvn/jvm.config gradle.properties Dockerfile .github/workflows
2. env | grep -E 'JAVA_OPTS|JAVA_TOOL_OPTIONS|MAVEN_OPTS|GRADLE_OPTS'
3. Delete or replace the flag (e.g. MaxPermSize → MaxMetaspaceSize if a limit is really needed)
Expected: Command proceeds without the error.
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- d67abc96-9ef5-438d-bc2a-1345aeb6bfb1
- Proposed action
- Recommended action: Find where the flag comes from (echo $JAVA_OPTS $JAVA_TOOL_OPTIONS $MAVEN_OPTS $GRADLE_OPTS; .mvn/jvm.config; gradle.properties org.gradle.jvmargs; Dockerfile ENTRYPOINT) and remove/replace it; the JVM may print a 'Did you mean ...' suggestion. Use -XX:+IgnoreUnrecognizedVMOptions only as a temporary crutch. Option: Remove expired flags from JVM option sources [evidence: official_recommended_action] Applies when: See record scope. Steps: 1. grep -rn 'XX:' .mvn/jvm.config gradle.properties Dockerfile .github/workflows 2. env | grep -E 'JAVA_OPTS|JAVA_TOOL_OPTIONS|MAVEN_OPTS|GRADLE_OPTS' 3. Delete or replace the flag (e.g. MaxPermSize → MaxMetaspaceSize if a limit is really needed) Expected: Command proceeds without the error.
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.