nailgun
=======
This repository contains implementations of a nailgun client in Python and in C.
What is nailgun?
Benefits of nailgun?
MacOS Build and Installation
Linux Build and Installation
How to run a java program
Other implementations
Legal
Nailgun is a client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead.Programs run in the server (which is implemented in Java), and are triggered by the client (written in C), which handles all I/O.
Note: Nailgun is based on original code developed by Marty Lamb, you can find his original website here. As of October 2017, the repository has been transferred to facebook and is being maintained and used by Buck team. Nailgun will remain available under the Apache license, version 2.0.
Elimanate JVM startup time completely and run all of your java apps in the same JVM called the nailgun server which only starts once. This gets rid of the slow startup times of the JVM everytime you want to run a program.
To install nailgun on Mac:
brew install nailgun
To start a background server:
$ brew install nailgun
$ java -jar /usr/local/Cellar/nailgun/0.9.1/libexec/nailgun-server-0.9.1.jar
NGServer 0.9.1 started on all interfaces, port 2113.
Add the required jars
$ ng ng-cp /usr/local/Cellar/scala/2.12.2/libexec/lib/scala-library.jar
$ ng ng-cp s.jar
To install nailgun on Linux:
sudo apt update
sudo apt install nailgun
Using maven, from the project directory:
mvn clean install
The client is built using make. From the project directory, '
make && sudo make install
To create the windows client you will additionally need to
make ng.exe
By default Nailgun server runs on port 2113
Assume you have a file HelloWorld.class in
/home/28041/ng-sample/com/testrun/HelloWorld.class
run
ng ng-cp /home/28041/ng-sample
ng com.testrun.HelloWorld
For a more in depth guide go here
- snailgun, a client implementation written in Scala that compiles to native.
- railgun, a client implementation written in Ruby.
Apache License 2.0