It never entered my head, keeping that coupling with arduino via USB, it prevented me to explore remote area with sensors, also that the api JSSC de Alexey Sokolov is no longer maintained, only a fork that I see quite active people and it is here jSerialComm.
With instrumentation we can do things with the bytecode before and after it is uploaded to the JVM, here I have 3 simple classes, a pathetic JFrame with an X=10; that can represent from the life of a player or any other type of variable in any java application (desktop, web app etc) with this technique we can modify that value.
This is an old version that I programmed in 2016
inspired by a post from security by default (post that without it would not be here I can swear).