I have a java web application running under tomcat in a Sun java 6 JVM. Is there a way to attach a scala or clojure REPL to the running JVM ?
Once the webapp is up and running, the context in which the calls are to be made is already setup in the running VM. Hence, this can be really helpful in invoking arbitrary java method calls for incremental, exploratory development and for debugging.
Copied over the answer from the other question as per your request:
liverepl: Connect a Clojure REPL to running Java or Clojure processes without any special setup
From the website:
Start a Clojure REPL connected to any running Java or Clojure process
without needing the process to be setup in any special way beforehand.
Now supports connecting to Tomcat web applications.
You can use the repl to run code, inspect variables, and
redefine Clojure functions.
https://github.com/djpowell/liverepl