Name Last modified Size
Parent Directory 26-Mar-2019 13:24 - CHANGELOG.txt 26-Mar-2019 13:23 12k COPYING 25-Feb-2019 09:09 1k Makefile 25-Feb-2019 09:09 2k README.txt 25-Feb-2019 09:09 6k cgi.h 15-Mar-2016 09:36 4k jnlp-server.c 25-Feb-2019 09:09 8k
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.