Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

IntelliJ IDEA Help

alperenxrq

New member
Joined
Nov 6, 2023
Messages
4
Reaction score
0
Points
1
I want to see the code instantly in IntelliJ IDEA. It's hard to restart my client all the time. I open it in Debug Mode but it doesn't work. Can you help me?
 
You cant hotswap new Methods, Classes etc.
You can add new code to methods or something like this.
If even this doesnt work, i would look to change your JDK, Some JDKs can have big autism so yea
 
To hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.

You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).

To use it with your client, you'll need two things:

First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.

Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.

Use only either OpenJDK or the Oracle JDK for this as explained on their website.

Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).

For this, you'll need to add options specifying:
  • Experimental VM options (-XX:+UnlockExperimentalVMOptions)
  • The Java agent (-javaagent:...)
  • The agent parameters (-agentlib:...)
  • (AltJVM only) the AltJVM (-XXaltjvm=...)
For reference, mine are:

Code:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"

And now, using this you should be able to hotswap freely using DCEVM!

Do note that:
  • The running instance may become "corrupted" over-time
  • It may cause crashes (infrequent)
  • You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more

I hope this helps, I've tried to simplify it down for you.

TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
 
To hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.

You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).

To use it with your client, you'll need two things:

First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.

Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.

Use only either OpenJDK or the Oracle JDK for this as explained on their website.

Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).

For this, you'll need to add options specifying:
  • Experimental VM options (-XX:+UnlockExperimentalVMOptions)
  • The Java agent (-javaagent:...)
  • The agent parameters (-agentlib:...)
  • (AltJVM only) the AltJVM (-XXaltjvm=...)
For reference, mine are:

Code:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"

And now, using this you should be able to hotswap freely using DCEVM!

Do note that:
  • The running instance may become "corrupted" over-time
  • It may cause crashes (infrequent)
  • You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more

I hope this helps, I've tried to simplify it down for you.

TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
Very good explanation
 
To hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.

You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).

To use it with your client, you'll need two things:

First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.

Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.

Use only either OpenJDK or the Oracle JDK for this as explained on their website.

Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).

For this, you'll need to add options specifying:
  • Experimental VM options (-XX:+UnlockExperimentalVMOptions)
  • The Java agent (-javaagent:...)
  • The agent parameters (-agentlib:...)
  • (AltJVM only) the AltJVM (-XXaltjvm=...)
For reference, mine are:

Code:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"

And now, using this you should be able to hotswap freely using DCEVM!

Do note that:
  • The running instance may become "corrupted" over-time
  • It may cause crashes (infrequent)
  • You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more

I hope this helps, I've tried to simplify it down for you.

TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
Thank you, I will try it soon
 
To hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.

You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).

To use it with your client, you'll need two things:

First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.

Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.

Use only either OpenJDK or the Oracle JDK for this as explained on their website.

Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).

For this, you'll need to add options specifying:
  • Experimental VM options (-XX:+UnlockExperimentalVMOptions)
  • The Java agent (-javaagent:...)
  • The agent parameters (-agentlib:...)
  • (AltJVM only) the AltJVM (-XXaltjvm=...)
For reference, mine are:

Code:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"

And now, using this you should be able to hotswap freely using DCEVM!

Do note that:
  • The running instance may become "corrupted" over-time
  • It may cause crashes (infrequent)
  • You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more

I hope this helps, I've tried to simplify it down for you.

TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
Dude, I did what you said, but the codes I changed are not reflected in the game.
 
Dude, I did what you said, but the codes I changed are not reflected in the game.
I'd recommend having a look at the IntelliJ article: Altering the program's execution flow

It tells you how to hotswap using Intellij - you may not be doing it correctly.

Of course there is the basics:

If neither of those work, could you potentially record a video of what is happening and send us it?

You may also want to check places like StackOverflow since a solution may already be on there.
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top