Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs about how to use it? #10

Open
hansgru opened this issue Jul 2, 2015 · 2 comments
Open

Docs about how to use it? #10

hansgru opened this issue Jul 2, 2015 · 2 comments

Comments

@hansgru
Copy link

hansgru commented Jul 2, 2015

Are there any docs about how to use liverepl?

Than you.

@djpowell
Copy link
Owner

djpowell commented Jul 2, 2015

The only documentation is the README file which shows how to start liverepl.

Once started, you should be presented with a Clojure REPL prompt where you can enter and execute Clojure code. Any introductory Clojure tutorial or book should explain.

@olivergg
Copy link

olivergg commented Jan 7, 2016

One of the purposes of liverepl (I guess) is to connect to an existing java application to run custom code without recompiling and restarting it.

; import some custom java class
(import 'a.foo.bar.java.package.SomeJavaClass)

; do something
(def fooclass (new SomeJavaClass))
(.fooMethod fooclass)

; inspect the members of the java class using clojure reflect api
(use 'clojure.reflect 'clojure.pprint)
(pprint (reflect fooclass)) ;

See clojure java interop page

For example, in a Spring based java webapp, it can be used to load custom beans (via the spring context loader) and run arbitrary code at runtime on it. The same can be achieved using JMX, but you would have to annotate the methods to expose and recompile your webapp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants