Not something I tried myself, but conceptually if it's Java it should work.
CheerpJ Just-In-Time compiles Java bytecode at runtime, so it makes no difference if the classes come from JAR files or are dynamically generated.
How close are we to the birth and death of yavascript?
https://www.destroyallsoftware.com/talks/the-birth-and-death...
How close are we to the birth and death of yavascript?
https://www.destroyallsoftware.com/talks/the-birth-and-death...