|CHANGELOG.txt||12103||Oct 27 13:07:51 2020|
|COPYING||1259||Feb 25 01:09:50 2019|
|Makefile||1786||Feb 25 01:09:50 2019|
|README.html||5674||Nov 15 11:14:36 2019|
|README.txt||5475||Nov 15 11:14:36 2019|
|cgi.h||4025||Mar 15 02:36:42 2016|
|jnlp-server.c||7775||Feb 25 01:09:50 2019|
Note: Java Web Start and JNLP are no longer supported by Oracle or most web browsers.
The Java programming language and execution environment provide an excellent and portable way to implement a GUI (Graphical User Interface) client program for a networked embedded device. If the embedded network device includes a web server, the user interface client programs can be stored on the device and downloaded as necessary by the user client web browser.
The Java language originally included the Applet class specifically for the implementation of Java programs to be executed in a protected web browser environment or sandbox. However, the difficulty in supporting applets in a portable way led to the design of the Java Web Start environment that allows execution of Java applications (not just applets) by a client web browser.
The Java Web Start client (built into the browser and/or Java extension) relies on a JNLP (Java Network Launching Protocol) metadata file that describes the Java application, where to retrieve it, and how to execute it. In large scale installations, the JNLP metadata file is typically generated on the fly by a Python or Perl script or some similar method. However, very small embedded network devices may not have resources to run a Python or Perl interpreter.This JNLP server is a CGI program that can be run from an embedded system web server such as that included in the BusyBox suite. It will generate a JNLP file on the fly, based on both compile time constants and query parameters.
Download and unpack the source tarball. Switch to the source directory and run make.
Some make macros can change the behavior of jnlp-server:
Example make invocation (note the double quoting):
make VENDOR='"Munts Technologies"' JAR_REPOSITORY='"/www/java"'
The jnlp-server CGI program is largely controlled by appending query parameters to the URL. The following query parameters are recognized:
Here is an example URL reference, suitable for embedding in an HTML file, for a Java application program that connects to a TCP/IP server process on the server it came from:
<a href="/cgi-bin/jnlp-server?APPLICATION=example_client&ARG1=%40%40HOSTNAME%40%40">HTTP GET Java Client</a>
When the user clicks on this URL from his web browser, a query will be sent to the web server. The web server will run jnlp-server which will generate a JNLP file on the fly and return it to the user's web browser. The Java Web Start code within the browser will recognize the JNLP file and dispatch it to the Java Web Start client module. The Java Web Start client module will download example_client.jar from the web server and then execute it with the java interpreter, passing the name of the web server as the first command line argument to the Java main() method.