TravaOpenJDK11 is OpenJDK11 for developers. Since it is based on dcevm and integrated HotswapAgent, it allows advanced hotswap like method-field addition and many more. Trava is a build farm created and maintained by HotswapProjects. Build is transparent as much as possible. dcevm-11 source code is built on GitHub Actions and the produced JDK images are bundled with HotswapAgent. Building is exclusively based on modified AdoptOpenJDK scripts.
Download windows/linux/macos binaries, unpack and set JAVA_HOME to it's location (or add it as JDK to your IDE).
Starting with dcevm-11.0.9 HotswapAgent is disabled by default. HotswapAgent support can be enabled now in 3 different modes:
-XX:HotswapAgent=fatjar
turns on internal fatjar HotswapAgent-XX:HotswapAgent=core
turns on internal core HotswapAgent-XX:HotswapAgent=external
setup HotswapAgent support in JVM and leaves settings of external HotswapAgent on user. User must supply hotswap-agent.jar using additional argument e.g. -javaagent:<path>/hotswap-agent.jar
disabled
- default value.HotswapAgent=core
mode has no plugins except of core JVM plugins. It is faster since less scanning tasks and less class copying are necessary to be done. Additional plugins must be configured as maven dependencies in pom.xml
. In HotswapAgent=fatjar
mode all plugins are available from start, it slows down application start little bit.
Since dcevm11.0.9 G1 is default garbage collector, it improves compatibility with standard JDK. It is first necessary step to replace system JDK by dcevm in the future. Serial GC can be turn on by standard option -XX:+UseSerialGC
For HotswapAgent configuration look at hotswapagent.org. HotswapAgent support can be turned on using option -XX:HotswapAgent=[fatjar,core,external]
Starting with dcevm11 option -XXaltjvm=dcevm is not supported anymore. There is a full java-11-openjdk distribution instead of it.
Use -XX:+UseSerialGC
JVM option to turn on Serial garbage collector.
Use option -XX:-AllowEnhancedClassRedefinition
to disable advanced redefinition and switch JVM to standard redefinition (only in-method modifications are allowed)
hotswap@skybber ~ $ java -XX:HotswapAgent=fatjar -version
Starting HotswapAgent '/usr/lib/jvm/java-11-openjdk/lib/hotswap/hotswap-agent.jar'
HOTSWAP AGENT: 18:06:22.007 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.4.2-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 18:06:22.221 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, WatchResources, AnonymousClassPatch, ClassInitPlugin, JdkPlugin, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis]
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment (build 11.0.9+0)
With HotswapAgent disabled:
hotswap@skybber ~ $ java -version
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment (build 11.0.9+0)
Dynamic Code Evolution 64-Bit Server VM (build 11.0.9+0, mixed mode)
It is not necessary to use supplied binaries, you can build your own binaries. It is simple and it can be done in several clicks:
git push origin :refs/tags/${SOURCE_JDK_TAG}
git tag -fa ${SOURCE_JDK_TAG}
git push origin master --tags
Let's jdk source repository has new tag of value TAGVAL
dcevm_branch
and dcevm_tag
in push.yml
to TAGVAL