@kesson you know there’s an application designed to do this?! I wrote a blog post recently on why neither of these approaches are good for what you’re trying to do there - https://www.praxislive.org/blog/just-in-time-programming/
I’m not sure the Processing HotSwap has any ability to control the parent classloader. Without that you won’t be able to add libraries at runtime, but you should be able to add the import ...
statement if the JAR is already part of the running project. Theoretically PraxisLIVE supports adding JARs into a running program, although there’s a bug in some cases I’m working on at the moment.
I’m not sure what the REPL mode is doing differently - never looked at it.
It shouldn’t be crashing because of a big array, but how are you creating this (or not creating it 60x a second)? You can’t add fields or methods using HotSwap.