LibGdx, Eclipse and Gradle about hotSwap

Hey!
I have read about gradle, about hotswap and about various configurations and I can not understand practically anything.
All with LibGdx.
In Eclipse, if you click on debug “your project”, you can change code, save and see it instantly in your app.
In Android Studio this doesn’t happen and in the terminal with “gradlew.bat desktop:run”, for example, neither. The closest thing I have achieved has been run from the terminal “gradlew.bat desktop:run -t” and when I close the app, make a code-change, and save, the app will open with the new changes. (Which is similar to what android studio does)

My question is, to what exactly is this behavior due? Can you get it from the terminal?

Thanks!! :smiley: :smiley:

HotSwap is a capability of the Java Platform Debugger Architecture that is built into “some” JVMs (Oracle’s HotSpot and OpenJDK support it).
When you attach a debugger to your application (in your case Eclipse is the debugger client), the JPDA client can issue a request (over the JDWP / Java Debug Write Protocol) to redefine a class (much like a Java Agent can over the JVMTI interface).
It is inherently a feature of certain JVMs and has nothing to do with Android (Dalvik is NOT a Java VM) or a terminal client.

More specifically, it allows you to redefine the code of a method. You cannot change the structure of a class - add fields / methods, change method arguments, etc.

Well, as they’re one and the same thing … ;D usually

Thanks a lot!! Problem solved!! ;D ;D