Unable to run jnlp using Open Webstart Java 8

437 Views Asked by At

My application is developed on oracle jdk8 and UI is written in javafx. UI runs with javaws however, it openWebstart fails to launch same UI with error "Application Error: Not a launchable JNLP file". Below are log snippets:

[ITW-CORE][2023-10-25 16:00:51.610 IST][INFO ][net.sourceforge.jnlp.Parser] good - your JRE - 1.8.0_372 - match requested JRE - 1.8+
[ITW-CORE][2023-10-25 16:00:51.630 IST][ERROR][net.sourceforge.jnlp.AbstractLaunchHandler]
netx: Application Error: Not a launchable JNLP file.
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Not a launchable JNLP file. File must be a JNLP application, applet, or installer type.
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:670)
[ITW-CORE][2023-10-25 16:00:51.631 IST][ERROR][net.sourceforge.jnlp.Launcher]
Launch exception
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Not a launchable JNLP file. File must be a JNLP application, applet, or installer type.
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:670)
[ITW-CORE][2023-10-25 16:00:59.350 IST][INFO ][net.sourceforge.jnlp.util.logging.OutputController] Increase polling interval for shutdown phase
[ITW-CORE][2023-10-25 16:00:59.357 IST][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.CacheImpl] No other instances of javaws are running

Downloaded OWS from their official site. Made it as a default application for opening jnlp files. Added Java 1.8 in JVM Manager in OWS settings

Jnlp file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<jnlp spec="1.0+" codebase="http://172.17.147.60:18080/pwui" href="pwui.jnlp">
   <information>
      <title>Management Client</title>
      <icon kind="shortcut" href="image.jpg"/> 
      <shortcut online="true">
         <desktop/>
      </shortcut>
   </information>
   <resources>
      <j2se version="1.8+" java-vm-args="-XX:MaxPermSize=256m" />
      <jar href="Client.jar" main="true" />
      <jar href="Common.jar" main="false" />
      <jar href="EJBClient.jar" main="false" />
      <jar href="jnlp.jar" main="false" />
      <jar href="jbossall-client.jar" main="false" />
      <jar href="FXExperienceControls.jar" main="false" />
      <jar href="commons-codec-1.7.jar" main="false" />
      <jar href="commons-io.jar" main="false" />
      <jar href="itextpdf-5.4.1.jar" main="false" />
   </resources>
   <security><all-permissions/></security>
   <jfx:javafx-desc  main-class="com.client.fx.login.LoginScreen" />
   <update check="always" policy="always" />
</jnlp>
1

There are 1 best solutions below

0
On BEST ANSWER

As far as I know IcedTea-Web, which is used under the hood of OpenWebStart does not have support for jfx:javafx-desc.

Instead you need to have an application-desc that defines the main class.

Also see this OpenWebStart FAQ entry: https://openwebstart.com/docs/FAQ.html#_how_to_run_openjfx_based_javafx_applications_with_openwebstar