I'm trying to use hot code swap, so that I don't have to restart my entire application when I make small changes to the code ... but it doesn't seem to work.
This is what I have tried so far :
* project > properties > compile : Compile on save=ON
* tools > options > java > debugger > general : apply code changes after save=ON
* run project in debug mode, with or without breakpoints
* change position of a game item, change color of a lamp > save > no effect inside the game window ...
* I also tried 'HotSwapAgent' (http://hotswapagent.org/ (http://hotswapagent.org/))
Anybody have any ideas ??? It seems simple enough, but maybe I'm doing something wrong ?
Where exactly do you "change position of a game item". What exactly do you mean by that.
HotSwap can only change the code in a method or constructor.
I've tried different places, but all inside methods.
For instance, I tried changing the glClearColor() in the render method.
OK. I think I have it working now ...
If anyone is interested :
* project > properties > compile : Compile on save = OFF
* tools > options > java > debugger > general : Apply code changes after save = OFF
After you make some code changes : save the file. Press 'apply code changes' button (3 green squares next to 'run to cursor' button) ... et voila !
Remember :
* ONLY for code that is referenced in main game loop !!!!!
* ONLY for code that is running in debug mode !!!!!
* ONLY for modification of existing methods (no new method, new variable, new class creation) !!!!!
I am using Apache NetBeans 11 with OpenJDK 11 (proj > props > libr : JDK11), but it will most likely work for older versions as well.