我的应用程序是在Oracle JDK 8上开发的,UI是用javafx写的.UI与javaws一起运行,但是openWebstart无法启动相同的UI,并出现错误"Application Error:Not a launchable JNLP file". 下面是日志(log)片段:
[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
从他们的官方网站下载了OWS.使其成为打开jnlp文件的默认应用程序.在OWS设置中的JVM管理器中添加了Java 1.8
Jnlp文件:
<?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>