You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/03/02 15:01:18 UTC

[GitHub] [rocketmq] JerryChaox commented on issue #1718: Switching from CMS to G1

JerryChaox commented on issue #1718: Switching from CMS to G1
URL: https://github.com/apache/rocketmq/issues/1718#issuecomment-593444788
 
 
   > I performed verification tests. There is no problem with GC switching, but high-level JDK (after JDK1.8)is not supported because of modularity and class loader.
   > 我进行了验证测试,GC替换没有问题,但是由于模块化和类加载器等原因,高版本JDK不支持。
   
   According to the migration guide:
   
   1. https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-A78CC891-701D-4549-AA4E-B8DD90228B4B
   2. https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-A78CC891-701D-4549-AA4E-B8DD90228B4B
   
   Starting from JDK 9
   > Class and resource files previously stored in lib/rt.jar, lib/tools.jar, lib/dt.jar and various other internal JAR files are stored in a more efficient format in implementation-specific files in the lib directory.
   
   >The javac compiler and java launcher will exit if the java.ext.dirs system property is set, or if the lib/ext directory exists. To additionally check the platform-specific systemwide directory, specify the -XX:+CheckEndorsedAndExtDirs command-line option. This causes the same exit behavior to occur if the directory exists and isn’t empty. The extension class loader is retained in JDK 9 and is specified as the platform class loader (see getPlatformClassLoader.)
   
   So starting from jdk9, it's necessary to remove this line for JAVA_OPT:
   `JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${JAVA_HOME}/jre/lib/ext:${BASE_DIR}/lib"`
   and rocketmq does not need the extension mechanism.
   
   Moreover, it's necessary to check if rocketmq break the rules of this new specification (JEP220).
   
   [See JEP 220: Modular Run-Time Images. ](http://openjdk.java.net/jeps/220)
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services