This provide simple way to download hotswap agent to your project folder without pain setup it
Can be use for other purposes outside of below example, be creative with it :chenstare:
Warning: You have to install DCEVM to your JDK and make sure your Gradle is using it, else this won't work as HotswapAgent relied on DCEVM to work (check ref here or below install guide)
DCEVM does not officially support mixin swapping:
- When run on Java 1.8:181, DCEVM and Mixin reloads do not work.
- When run on DCEVM Java 11, you can reload, but the hot swap task freezes.
- When run on JetBrains Runtime's Java 17 fork (with DCEVM), Mixin hotswapping and DCEVM work properly.
You can use JDK from any distributor (I dont guarantee it will work, have a test yourself) The one I will do in this guide is Zulu, take this as reference and apply base on which distribution you will use.
- Check the notes first to decide which version you will use, then download DCEVM from here.
- Run it as a Java application (if your JAVA_HOME and PATH only contains Java8), or specific it and run on the terminal as below:
java -jar DCEVM-8u<version>-installer.jar
(vary on the downloaded file name). - As DCEVM was built on very very old days, it won't detect most of newer Java distributor. So now you will have to specific it yourself (ref).
- If you are prefer running DCEVM as main JVM, then press
Replace by DCEVM
. Else if you are also use it for other purposes, pressInstall DCEVM as altjvm
. With this done, theUninstall
button should highlight up and ready to use for hotswapping. - If you are install it as
altjvm
, make sure to add-XXaltjvm=dcevm
to the JVM launch argument to make sure that you are using DCEVM as JVM or else this won't work. - Make sure that you are point your IDE or whatevery it is to use the JDK you just install DCEVM, else it will throw errors out. :smug:
Also, it is better to install it as altjvm so you can use the JDK for other purposes without have headache if anything goes wrong.
- Work with minecraft modding gradle project using RetroFuturaGradle
- Can be copy and paste directly within
build.gradle
(orextra.gradle
if you are using CleanroomMC overhaul template) - Already added argument to switch JVM to DCEVM.