Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 2.69 KB

README.md

File metadata and controls

79 lines (51 loc) · 2.69 KB

Java REPL

NOT MAINTAINED: Since Java is now released with REPL this project will no longer be maintained.

Travis GitHub Docker Pulls

Java REPL is a simple Read-Eval-Print-Loop for Java language.

  • Support for most of Java language constructs
  • Access from console as well as web terminal via browser
  • Create imports, methods, classes, enums and interfaces
  • Load classes from any jar file or directory (including web urls)
  • Load and evaluate expression from file
  • List previous results, imports, created types and methods
  • Show history of evaluations
  • Search and evaluate expression from history
  • Clear and replay previous evaluations
  • Load and evaluate any Java source file
  • Basic code completion for results, classes and methods
  • Coloured output for console and web terminal

Build

Building Java REPL requires the gradle.

After cloning the git repository, navigate over to it and run:

$ gradle shadowJar

After this completes, the jar completed with bundled dependencies will be located at build/libs/javarepl-dev.jar

Type the following to run

$ java -jar build/libs/javarepl-dev.jar

Releases

Releases are automatically released to Maven Central. Configure repository and then add Java REPL as dependency:

<dependencies>
    <dependency>
        <groupId>com.javarepl</groupId>
        <artifactId>javarepl</artifactId>
        <version>SOME_VERSION</version>
    </dependency>
</dependencies>

Usage

To run Java REPL you need to install Java Development Kit (JDK). Download it from here and follow install instructions. Once JDK is installed and configured, download latest Java REPL release from GitHub or Bintray then run:

$ java -jar javarepl-SOME_VERSION.jar

If this doesn't work try to run pointing directly to java executable within JDK, like so

$ <PATH_TO_JDK>/bin/java -jar javarepl-SOME_VERSION.jar

License

Distributed under the Apache 2.0