.
Eloquence JDLG contact contact

Documentation / Eloquence JDLG / EQWS Utility

EQWS Utility

 
.
  Document revision: 2023-02-22
Refers to EQWS version: 1.0.0


Contents


The EQWS utility is a simple and lightweight alternative to Java Webstart (javaws) which is no longer included in Oracle Java since version 11.

EQWS is compatible with existing JNLP files and handles multiple JAR files and/or extension JNLP files, for example to use JDLG plugins.

Similar to Java Webstart, EQWS maintains a local cache where JNLP and JAR files are downloaded as necessary. EQWS then starts a local Java VM process, providing the main JAR file along with any properties and additional arguments specified in the JNLP file(s).

If multiple JAR files are specified (e.g., to use JDLG plugins), EQWS creates a "launcher JAR file" providing the necessary Java class path.

Please note:

  • EQWS requires Java version 7 or newer.

  • Unlike Java webstart, the current EQWS implementation does not require code-signed JAR file(s), i.e., it does not check the JAR file certificates and code signatures. As a consequence, EQWS should not be configured as general JNLP file handler because this could cause unknown JAR files to be started.

  • Two Java VM processes are used, one for EQWS and another to run the application. The additional memory usage should be less than 30 MB.

  • The application's working directory is set to the cache subdirectory containing the main JAR file. The jnlp.codebase Java property is set to the codebase of the main JNLP file.

  • EQWS does not provide the JNLP API.


Download EQWS and copy the eqws.jar file to a local directory or a shared subdirectory.

The usage examples below assume that eqws.jar has been copied to the local C:\Util directory on a Windows PC.


Command line usage:
usage: java -jar eqws.jar [options] JNLP-URL
       java -jar eqws.jar -help
       java -jar eqws.jar -version
       java -jar eqws.jar -c
options:
 -a ARGUMENT  - additional Java VM argument
 -c           - clear cache, delete cache directory
 -j JVM-FILE  - absolute path to Java VM executable file
                default: use EQWS_JVM env variable or 'java'
 -v[vv]       - output additional information

The following example assumes that Java Webstart is used to start JDLG with a command line like below:

javaws http://intranet/jdlg/jdlg.jnlp

Assuming that eqws.jar is located in the local C:\Util directory on a Windows PC, it can equivalently be used to start JDLG:

java -jar C:\Util\eqws.jar http://intranet/jdlg/jdlg.jnlp

Command line options:

  • The -a command line option may be used to specify additional Java VM arguments.

    For example, to use JDLG drag & drop with Java 9 or newer, the following VM arguments must be specified:

    --add-opens=java.desktop/javax.swing=ALL-UNNAMED
    --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
    

    The preferred way to specify them is by adding the java-vm-args attribute to the <j2se ...> tag in the JNLP file:

    <j2se version="1.5+"
          java-vm-args="--add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED"/>
    

    Alternatively, they can be specified with the EQWS -a command line option:

    java -jar C:\Util\eqws.jar -a--add-opens=java.desktop/javax.swing=ALL-UNNAMED -a--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED http://intranet/jdlg/jdlg.jnlp
    

  • The -c command line option may be used to clear the local cache, so that all locally cached JNLP and JAR files are deleted.

    The cache automatically recognizes when a remote file has been updated, therefore using the -c command line option should never be necessary.

  • The -j command line option, or the EQWS_JVM environment variable, may be used to invoke a specific Java VM executable. By default, java is invoked.

    For example, if JDLG should run in a specific Java VM (here: Zulu OpenJDK 8 on Windows):

    java -jar C:\Util\eqws.jar -j "C:\Program Files\Zulu\zulu-8\bin\java.exe" http://intranet/jdlg/jdlg.jnlp
    

    Or, on Windows, if javaw should be used, for example in a desktop link, to avoid that a console window is opened:

    javaw -jar C:\Util\eqws.jar -jjavaw http://intranet/jdlg/jdlg.jnlp
    

    Please note that when using javaw, any output of EQWS and/or the application is suppressed, which could complicate error diagnostics. If javaw is used and EQWS does not appear to work as expected, java should be used in a Command Prompt console window to analyze what causes the problem.

    Also, javaw output can be redirected to a log file, like:

    javaw -jar C:\Util\eqws.jar ... >>%TEMP%\eqws.log 2>&1
    

  • The -v (verbose) command line option causes EQWS to output additional information, depending on the verbosity level.

    -v (verbosity level 1) outputs which files are downloaded to the local cache. It also outputs the title of the main JNLP file. For example:

    Loading: 'http://intranet/jdlg/jdlg-with-plugins.jnlp'
    Loading: 'http://intranet/jdlg/jdlgS.jar'
    Starting: 'Eloquence JDLG with Plugins'
    

    -vv (verbosity level 2) in addition outputs the location of the cache directory and which cached files are used. For example:

    Cache directory: '/tmp/eqws/mary/'
    Loading: 'http://intranet/jdlg/jdlg-with-plugins.jnlp'
    Loading: 'http://intranet/jdlg/jdlgS.jar'
    Cached: 'http://intranet/jdlg/charts/charts.jnlp'
    Cached: 'http://intranet/jdlg/charts/jdlgS-charts.jar'
    Cached: 'http://intranet/jdlg/charts/jcommon.jnlp'
    Cached: 'http://intranet/jdlg/charts/jcommonS-1.0.23.jar'
    Cached: 'http://intranet/jdlg/charts/jfreechart.jnlp'
    Cached: 'http://intranet/jdlg/charts/jfreechartS-1.0.19.jar'
    Cached: 'http://intranet/jdlg/datepicker/datepicker.jnlp'
    Cached: 'http://intranet/jdlg/datepicker/jdlgS-datepicker.jar'
    Cached: 'http://intranet/jdlg/datepicker/swingx.jnlp'
    Cached: 'http://intranet/jdlg/datepicker/swingxS-1.0.jar'
    Cached: 'http://intranet/jdlg/editgrid/editgrid.jnlp'
    Cached: 'http://intranet/jdlg/editgrid/jdlgS-editgrid.jar'
    Starting: 'Eloquence JDLG with Plugins'
    

    -vvv (verbosity level 3) in addition outputs the Java VM command line. If EQWS fails, a stack trace is output.


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2023-02-22  
  Copyright © 1995-2021 Marxmeier Software AG