Skip to content

Simple Java and Groovy hot class reloader and Java based shell and scripting

Notifications You must be signed in to change notification settings

jmarranz/relproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

RelProxy

RelProxy is a simple Java and Groovy hot class reloader for Java and Groovy providing transparent compilation and class reload on the fly, and scripting support and shell of pure Java code.

News

Download Binaries and Docs

Download

Distribution file includes binaries, examples, manual and javadocs.

Artefacts are uploaded to JCenter (direct) and Maven Central (direct) repositories

Maven:

<groupId>com.innowhere</groupId>
<artifactId>relproxy</artifactId>
<version>(version)</version>
<type>jar</type>

Overview

RelProxy is a simple Java and Groovy hot class reloader for Java and Groovy providing transparent compilation and class reload on the fly, and scripting support and shell of pure Java code.

RelProxy is:

  1. A simple Java and Groovy hot class reloader for Java and Groovy providing transparent compilation and class reload on the fly with no need of a bootstrap class loader agent and avoiding context reloading. Reloading happens only in memory. Class reloading can be used in development phase and optionally in production (if source code can be uploaded to production).

  2. A scripting environment to execute Java code snippets the same as a shell script. There is no new language, is Java compiled on the fly, code in the initial archive can call to other normal Java files. Optionally .class can be saved in a cache to provide the fastest "scripting" language of the world.

  3. Execution of Java code snippets in command line (no need of packaging into an archive).

  4. A simple shell to code, edit and execute code snippets in Java interactively.

  5. JSR 223 Scripting API implementation for "Java" as the target scripting language. You can embed and execute Java code as scripting into your Java program.

In case of Java "scripting", there is no a new language, is pure Java code with compilation on the fly.

In spite of RelProxy is a general purpose tool it was conceived for ItsNat web framework to provide hot class reload in development time... and if you want also in production. RelProxy is standalone and has no dependency on ItsNat.

RelProxy Manual explains how to configure and use RelProxy in NetBeans and Eclipse avoiding class reloading (of course other IDEs are possible).

There are several examples of how to use RelProxy with most popular Java web frameworks ready to run into RelProxy Examples repository. Also ItsNat Experiments includes an ItsNat example using NetBeans with Ant, to reload Java and Groovy code. The most complex example is relproxy_test_itsnat created for internal testing.

Besides fast and custom Java (and Groovy) class reloading, RelProxy provides a Java shell scripting environment to execute:

  1. A pure Java archive packaged like a shell script file with no need of previous compilation, compilation is done on the fly and optionally .class can be saved in a cache to provide the fastest "scripting" language of the world. Code in the initial archive can call to other normal Java files, again with compilation on the fly and optional compilation caching as .class files. Example 1 and example 2 or just a conventional Java source file (yes you can execute a conventional JavaSE application from source code).

  2. Execution of Java code snippets in command line (no need of packaging in an archive). Example.

  3. Interactive console to edit and execute Java code (ever compilation on the fly). Example of launcher

Finally RelProxy implements the official JSR-223 Java Scripting API as found in Java 1.6 for "Java" language. By using this API you can embed Java as any other scripting language in your Java code.

Yes, Java is also a dynamic scripting language with no need of manual compilation, and it is extremely fast and robust.

Online Docs Last Version

Manual

JavaDocs

Examples

See the GitHub repository RelProxy Examples

Questions and discussions

There is a Google Group for RelProxy.

Bug Reporting

Use this GitHub project.

Articles/Blogs/Presentations

About

Simple Java and Groovy hot class reloader and Java based shell and scripting

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •