TC server 4.1.11 version ( 9.0.54.A Release), Upgrading JDK 8 to JDK 17,
If you're seeing the below error stack with "Unrecognized VM option" and issue with "java.rmi/sun.rmi.registry" , Provided in the below error stack example. you can try the following below as suggested
INFO: Server startup in [948] milliseconds
-XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -XX:InitialHeapSize=1073741824 -XX:MaxGCPauseMillis=500 -XX:MaxHeapSize=1073741824 -XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:ThreadStackSize=256 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC -XX:+UseParallelOldGC
INFO: Server initialization in [1372] milliseconds
Mar 01, 2023 9:42:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in [816] milliseconds
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Unrecognized VM option 'PrintGCDateStamps'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Unrecognized VM option 'PrintGCDateStamps'
Error: A fatal exception has occurred. Program will exit.
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:logs/gc-2023-03-07-10-48-47.log instead.
-XX:ConcGCThreads=1 -XX:+DisableExplicitGC -XX:G1ConcRefinementThreads=2 -XX:GCDrainStackTargetSize=64 -XX:+HeapDumpOnOutOfMemoryError -XX:InitialHeapSize=1073741824 -XX:MarkStackSize=4194304 -XX:MaxGCPauseMillis=500 -XX:MaxHeapSize=1073741824 -XX:MinHeapSize=1073741824 -XX:+PrintCommandLineFlags -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:ThreadStackSize=256 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
java.lang.Error: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
at org.apache.catalina.startup.Catalina.load(Catalina.java:727)
at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
... 7 more
Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.springsource.tcserver.serviceability.rmi.JmxSocketListener$JmxRegistry (in unnamed module @0x78e03bb5) cannot access class sun.rmi.registry.RegistryImpl (in module java.rmi) because module java.rmi does not export sun.rmi.registry to unnamed module @0x78e03bb5
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:137)
...
Product Version: 4.1
TC server 4.1.11 version Supports JDK17 upgrade;
bin/setenv.sh of tcserver # JDK_JAVA_OPTIONS is only used by JVM versions 9 and above. JDK_JAVA_OPTIONS="--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED"