HTTPS SSH

README

"The REFCODES.ORG codes represent a group of artifacts consolidating parts of my work in the past years. Several topics are covered which I consider useful for you, programmers, developers and software engineers."

What is this repository for?

Java 9's JShell can not only be used as a command line tool, furthermore you can harness its functionality in your own Java applications. Learn on how to harness the JShell by building a restful service around it.

Getting started

To get up and running, clone the funcodes-restrepl repository from bitbucket's git repository.

How do I get set up?

Using SSH, go as follows to get the Maven RestREPL project:

git clone git@bitbucket.org:refcodes/funcodes-restrepl.git

Using HTTPS, go accordingly as follows to get the Maven RestREPL project:

git clone https://refcodes@bitbucket.org/funcodez/funcodes-restrepl.git

Then you can build a fat-jar and launch the application:

cd funcodes-restrepl
mvn clean install
java -jar target/funcodes-restrepl-0.0.1-SNAPSHOT.jar

Big fat executable bash script (optional)

This step is optional, though when running your application under Linux, the following will be your friend:

To build a big fat single executable bash script, take a look at the funcodes-meta artifact and go for the file shellify.sh and its helper file shell-exec.inc respectively:

wget https://bitbucket.org/funcodez/funcodes-meta/raw/master/shellify.sh
wget https://bitbucket.org/funcodez/funcodes-meta/raw/master/shell-exec.inc
chmod ug+x shellify.sh
./shellify.sh target/funcodes-restrepl-0.0.1-SNAPSHOT.jar restrepl.sh
./restrepl.sh

The resulting restrepl.sh file is a big fat single executable bash script being launched via ./restrepl.sh.

Starting RestREPL server

As described above, you may go with directly executing the JAR file by invoking java -jar target/funcodes-restrepl-0.0.1-SNAPSHOT.jar or, after some doings, you may also go with the big fat executable bash script like restrepl.sh to start the RestREPL server.

Either way you launch the RestREPL server, you will be greeted with an ASCII art banner and a log output.

Futher reading

For an "unded the hood" insight and how to use the RESTful interface, please refer to the blog post Restful JShell ... RestREPL your Java 9's JShell!.

Contribution guidelines

  • Add a nifty user-interface
  • Add cool functionality (open/closed principle)
  • Finding bugs
  • Helping fixing bugs
  • Making code and documentation better
  • Enhance the code

Who do I talk to?

  • Siegfried Steiner (steiner@refcodes.org)

Terms and conditions

The REFCODES.ORG group of artifacts is published under some open source licenses; covered by the refcodes-licensing (org.refcodes group) artifact - evident in each artifact in question as of the pom.xml dependency included in such artifact.