Skip to content

nrepl/nrepl-java-example

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

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