I'm being forced to use java + springboot for a project at work, does anyone have any cool Java REPL setups, to retain an interactive programming model? I'm thinking of using tools namespace refresh start/stop to control the lifecycle functions of the springboot app, and then also using the JShell api to evaluate java code at runtime, and also add in a hotswap agent for good measure. So i'd still keep clojure around in my back pocket for development process, but wouldn't commit any clojure code to the repo.
I'm slowly arriving at a working java REPL 🙂
I use Virgil (https://github.com/clj-commons/virgil/) alongside LSP Java for project-aware IntelliSense in Emacs, paired with a Clojure REPL. To reset the state, you can touch a Clojure file in the Virgil post-hook by using .setLastModified on the file you want reloaded. This signals tools.namespace to refresh any components in your system that depend on the updated Java classes.
This might not sound exciting but you can achieve a little bit of an interactive programming experience with careful TDD and breakpoint debugging
got a make shift java REPL going, although the devil is in the details if you want a smooth experience.
uses emacs + tree sitter to parse out evaluable snippets / 'sexp' , creating an nrepl socket in the java project ran with maven, connecting to it with cider, and sending the snippets to a clojure wrapper around the jshell api to evaluate.
The debuggers for java are pretty nice, and these allow evaluation of code at runtime. In IntelliJ you can set a breakpoint, step through the execution, and evaluate code. It's not as powerful as what we have in Clojure, but at least it's better than the regular edit-compile-run cycle.