Skip to content

A simple example of embedding nREPL in a Java application

Notifications You must be signed in to change notification settings

nrepl/nrepl-java-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nREPL Java Example

This project contains a simple example of how to embed nREPL into a Java application.

Requirements

How To Use

Open a terminal and run:

mvn compile clojure:compile exec:java

You should see a message saying that nrepl is started on port 7888. Next, open another terminal and run:

clj -Sdeps '{:deps {nrepl {:mvn/version "0.8.3"}}}' -M -m nrepl.cmdline --connect --host localhost --port 7888

This will create a client connection to the nrepl server.

Once connected, you can interact with the running application via the Clojure REPL. Some things to try:

  • (.shutdown org.nrepl.App/instance) will shutdown the nrepl server (and disconnect your client)

About

A simple example of embedding nREPL in a Java application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published