尝试将 html 文件(由 netbeans 在构建 fxml 项目时生成)与模板的 html 页面嵌入时 JNLP 文件出错
Error in JNLP file while trying to embed the html file(generated by netbeans while building fxml project) with that of html page of a template
我在 netbeans 中创建了一个 javafx fxml 项目 "Login"。自动创建了一个名为 "Login.html" 的 html 文件。同时还创建了 "Login.jnlp" 文件。
我想将 "Login.html" 加载到 netbeans 中 web 模板的现有 html 页面中。我从下面给出的 link 中读到,在 netbeans ID 中,我们可以在项目属性的 运行 类别中指定输入 HTML 模板文件。
http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABFFCEI
我也做了同样的事情,但现在我收到错误 "JNLP failed:null"。我不知道我做错了什么。请帮助我。
这是我的 Login.jnlp 文件
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="Login.jnlp">
<information>
<title>Login</title>
<vendor>sachi</vendor>
<description>null</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Login.jar" size="15390" download="eager" />
<jar href="lib\derby.jar" size="2767455" download="eager" />
<jar href="lib\derbyLocale_cs.jar" size="94402" download="eager" />
<jar href="lib\derbyLocale_de_DE.jar" size="106528" download="eager" />
<jar href="lib\derbyLocale_es.jar" size="100641" download="eager" />
<jar href="lib\derbyLocale_fr.jar" size="106650" download="eager" />
<jar href="lib\derbyLocale_hu.jar" size="95104" download="eager" />
<jar href="lib\derbyLocale_it.jar" size="100488" download="eager" />
<jar href="lib\derbyLocale_ja_JP.jar" size="117126" download="eager" />
<jar href="lib\derbyLocale_ko_KR.jar" size="111545" download="eager" />
<jar href="lib\derbyLocale_pl.jar" size="93083" download="eager" />
<jar href="lib\derbyLocale_pt_BR.jar" size="90338" download="eager" />
<jar href="lib\derbyLocale_ru.jar" size="120950" download="eager" />
<jar href="lib\derbyLocale_zh_CN.jar" size="103466" download="eager" />
<jar href="lib\derbyLocale_zh_TW.jar" size="105050" download="eager" />
<jar href="lib\derbyclient.jar" size="577598" download="eager" />
<jar href="lib\derbynet.jar" size="249873" download="eager" />
<jar href="lib\derbyrun.jar" size="8180" download="eager" />
<jar href="lib\derbytools.jar" size="212990" download="eager" />
<jar href="lib\jfoenix.jar" size="2219684" download="eager" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="Login" >
<param name="requiredFXVersion" value="8.0+"/>
</applet-desc>
<jfx:javafx-desc width="800" height="600" main-class="login.Login" name="Login" />
<update check="always"/>
</jnlp>
这里是 "Login.html" 文件(由 netbeans 自动生成)。我想将此文件嵌入网站模板中的某个 html 文件中。
<html><head>
<SCRIPT src="./web-files/dtjava.js"></SCRIPT>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'Login.jnlp',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTG9naW4uam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+TG9naW48L3RpdGxlPg0KICAgIDx2ZW5kb3I+c2FjaGk8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTG9naW4uamFyIiBzaXplPSIxNjI1OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5LmphciIgc2l6ZT0iMjc2NzQ1NiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0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bi5Mb2dpbiIgIG5hbWU9IkxvZ2luIiAvPg0KICA8dXBkYXRlIGNoZWNrPSJhbHdheXMiLz4NCjwvam5scD4NCg=='
},
{
javafx : '8.0+'
},
{
}
);
return false;
}
</script>
<script>
function javafxEmbedlogin() {
dtjava.embed(
{
id : 'login',
url : 'Login.jnlp',
placeholder : 'javafx-app-placeholder',
width : '800',
height : '600',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTG9naW4uam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+TG9naW48L3RpdGxlPg0KICAgIDx2ZW5kb3I+c2FjaGk8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTG9naW4uamFyIiBzaXplPSIxNjI1OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5LmphciIgc2l6ZT0iMjc2NzQ1NiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5TG9jYWxlX2NzLmphciIgc2l6ZT0iOTQ0MDQiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgICA8amFyIGhyZWY9ImxpYlxkZXJieUxvY2FsZV9kZV9ERS5qYXIiIHNpemU9IjEwNjUzMiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZ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NCiAgICA8amFyIGhyZWY9ImxpYlxkZXJieWNsaWVudC5qYXIiIHNpemU9IjU3NzU5OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5bmV0LmphciIgc2l6ZT0iMjQ5ODcyIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWJcZGVyYnlydW4uamFyIiBzaXplPSI4MTgxIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWJcZGVyYnl0b29scy5qYXIiIHNpemU9IjIxMjk5MiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGpmb2VuaXguamFyIiBzaXplPSIyMjE5Njg3IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogIDwvcmVzb3VyY2VzPg0KPHNlY3VyaXR5Pg0KICA8YWxsLXBlcm1pc3Npb25zLz4NCjwvc2VjdXJpdHk+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iTG9naW4iID4NCiAgICA8cGFyYW0gbmFtZT0icmVxdWlyZWRGWFZlcnNpb24iIHZhbHVlPSI4LjArIi8+DQogIDwvYXBwbGV0LWRlc2M+DQogIDxqZng6amF2YWZ4LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJsb2dpbi5Mb2dpbiIgIG5hbWU9IkxvZ2luIiAvPg0KICA8dXBkYXRlIGNoZWNrPSJhbHdheXMiLz4NCjwvam5scD4NCg=='
},
{
javafx : '8.0+'
},
{}
);
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbedlogin);
</script>
</head><body>
<h2>Test page for <b>Login</b></h2>
<b>Webstart:</b> <a href='Login.jnlp' onclick="return launchApplication('Login.jnlp');">click to launch this app as webstart</a><br><hr><br>
<!-- Applet will be inserted here -->
<div id='javafx-app-placeholder'></div>
</body></html>
这里是netbeans中的输出日志
ant -f C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login jfxbe-run
init:
deps-clean:
Updating property file: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\built-clean.properties
Deleting directory C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build
clean:
init:
deps-jar:
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build
Updating property file: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\built-jar.properties
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\empty
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\generated-sources\ap-source-output
Compiling 4 source files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Copying 10 files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Copied 1 empty directory to 1 empty directory under C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
compile:
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist
Copying 19 files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib
Copied 1 empty directory to 1 empty directory under C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib
Detected JavaFX Ant API version 1.3
Going to create default keystore in C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\nb-jfx.jks
Generating Key for nb-jfx
Launching <fx:jar> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:signjar> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\Login.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derby.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_cs.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_de_DE.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_es.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_fr.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_hu.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_it.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ja_JP.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ko_KR.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_pl.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_pt_BR.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ru.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_zh_CN.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_zh_TW.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyclient.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbynet.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyrun.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbytools.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\jfoenix.jar
Launching <fx:deploy> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
No base JDK. Package will use system JRE.
JNLP failed : null
java.lang.ArrayIndexOutOfBoundsException
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:570)
at java.lang.StringBuilder.append(StringBuilder.java:190)
at com.oracle.tools.packager.jnlp.JNLPBundler.readTextFile(JNLPBundler.java:391)
at com.oracle.tools.packager.jnlp.JNLPBundler.execute(JNLPBundler.java:547)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:318)
at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at jdk.nashorn.internal.scripts.Script5$\^eval\_.:program(<eval>:405)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:1465: The following error occurred while executing this line:
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:3017: The following error occurred while executing this line:
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:2055: Error: Bundler "WebStart JNLP Bundler" (jnlp) failed to produce a bundle.
BUILD FAILED (total time: 5 seconds)
我自己找到了答案。
jnlp 文件没有任何问题。
我已经回答了我自己提出的一个有同样问题的问题。
我在 netbeans 中创建了一个 javafx fxml 项目 "Login"。自动创建了一个名为 "Login.html" 的 html 文件。同时还创建了 "Login.jnlp" 文件。
我想将 "Login.html" 加载到 netbeans 中 web 模板的现有 html 页面中。我从下面给出的 link 中读到,在 netbeans ID 中,我们可以在项目属性的 运行 类别中指定输入 HTML 模板文件。
http://docs.oracle.com/javafx/2/deployment/packaging.htm#BABFFCEI
我也做了同样的事情,但现在我收到错误 "JNLP failed:null"。我不知道我做错了什么。请帮助我。
这是我的 Login.jnlp 文件
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="Login.jnlp">
<information>
<title>Login</title>
<vendor>sachi</vendor>
<description>null</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Login.jar" size="15390" download="eager" />
<jar href="lib\derby.jar" size="2767455" download="eager" />
<jar href="lib\derbyLocale_cs.jar" size="94402" download="eager" />
<jar href="lib\derbyLocale_de_DE.jar" size="106528" download="eager" />
<jar href="lib\derbyLocale_es.jar" size="100641" download="eager" />
<jar href="lib\derbyLocale_fr.jar" size="106650" download="eager" />
<jar href="lib\derbyLocale_hu.jar" size="95104" download="eager" />
<jar href="lib\derbyLocale_it.jar" size="100488" download="eager" />
<jar href="lib\derbyLocale_ja_JP.jar" size="117126" download="eager" />
<jar href="lib\derbyLocale_ko_KR.jar" size="111545" download="eager" />
<jar href="lib\derbyLocale_pl.jar" size="93083" download="eager" />
<jar href="lib\derbyLocale_pt_BR.jar" size="90338" download="eager" />
<jar href="lib\derbyLocale_ru.jar" size="120950" download="eager" />
<jar href="lib\derbyLocale_zh_CN.jar" size="103466" download="eager" />
<jar href="lib\derbyLocale_zh_TW.jar" size="105050" download="eager" />
<jar href="lib\derbyclient.jar" size="577598" download="eager" />
<jar href="lib\derbynet.jar" size="249873" download="eager" />
<jar href="lib\derbyrun.jar" size="8180" download="eager" />
<jar href="lib\derbytools.jar" size="212990" download="eager" />
<jar href="lib\jfoenix.jar" size="2219684" download="eager" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="Login" >
<param name="requiredFXVersion" value="8.0+"/>
</applet-desc>
<jfx:javafx-desc width="800" height="600" main-class="login.Login" name="Login" />
<update check="always"/>
</jnlp>
这里是 "Login.html" 文件(由 netbeans 自动生成)。我想将此文件嵌入网站模板中的某个 html 文件中。
<html><head>
<SCRIPT src="./web-files/dtjava.js"></SCRIPT>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'Login.jnlp',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTG9naW4uam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+TG9naW48L3RpdGxlPg0KICAgIDx2ZW5kb3I+c2FjaGk8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTG9naW4uamFyIiBzaXplPSIxNjI1OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5LmphciIgc2l6ZT0iMjc2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GhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJsb2dpbi5Mb2dpbiIgIG5hbWU9IkxvZ2luIiAvPg0KICA8dXBkYXRlIGNoZWNrPSJhbHdheXMiLz4NCjwvam5scD4NCg=='
},
{
javafx : '8.0+'
},
{
}
);
return false;
}
</script>
<script>
function javafxEmbedlogin() {
dtjava.embed(
{
id : 'login',
url : 'Login.jnlp',
placeholder : 'javafx-app-placeholder',
width : '800',
height : '600',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTG9naW4uam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+TG9naW48L3RpdGxlPg0KICAgIDx2ZW5kb3I+c2FjaGk8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTG9naW4uamFyIiBzaXplPSIxNjI1OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5LmphciIgc2l6ZT0iMjc2NzQ1NiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5TG9jYWxlX2NzLmphciIgc2l6ZT0iOTQ0MDQiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgICA8amFyIGhyZWY9ImxpYlxkZXJieUxvY2FsZV9kZV9ERS5qYXIiIHNpemU9IjEwNjUzMiIgZG93bmxvY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PSIxMDUwNTIiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgICA8amFyIGhyZWY9ImxpYlxkZXJieWNsaWVudC5qYXIiIHNpemU9IjU3NzU5OSIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGRlcmJ5bmV0LmphciIgc2l6ZT0iMjQ5ODcyIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWJcZGVyYnlydW4uamFyIiBzaXplPSI4MTgxIiBkb3dubG9hZD0iZWFnZXIiIC8+DQogICAgPGphciBocmVmPSJsaWJcZGVyYnl0b29scy5qYXIiIHNpemU9IjIxMjk5MiIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICAgIDxqYXIgaHJlZj0ibGliXGpmb2VuaXguamFyIiBzaXplPSIyMjE5Njg3IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogIDwvcmVzb3VyY2VzPg0KPHNlY3VyaXR5Pg0KICA8YWxsLXBlcm1pc3Npb25zLz4NCjwvc2VjdXJpdHk+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iTG9naW4iID4NCiAgICA8cGFyYW0gbmFtZT0icmVxdWlyZWRGWFZlcnNpb24iIHZhbHVlPSI4LjArIi8+DQogIDwvYXBwbGV0LWRlc2M+DQogIDxqZng6amF2YWZ4LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJsb2dpbi5Mb2dpbiIgIG5hbWU9IkxvZ2luIiAvPg0KICA8dXBkYXRlIGNoZWNrPSJhbHdheXMiLz4NCjwvam5scD4NCg=='
},
{
javafx : '8.0+'
},
{}
);
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbedlogin);
</script>
</head><body>
<h2>Test page for <b>Login</b></h2>
<b>Webstart:</b> <a href='Login.jnlp' onclick="return launchApplication('Login.jnlp');">click to launch this app as webstart</a><br><hr><br>
<!-- Applet will be inserted here -->
<div id='javafx-app-placeholder'></div>
</body></html>
这里是netbeans中的输出日志
ant -f C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login jfxbe-run
init:
deps-clean:
Updating property file: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\built-clean.properties
Deleting directory C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build
clean:
init:
deps-jar:
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build
Updating property file: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\built-jar.properties
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\empty
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\generated-sources\ap-source-output
Compiling 4 source files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Copying 10 files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
Copied 1 empty directory to 1 empty directory under C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\classes
compile:
Created dir: C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist
Copying 19 files to C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib
Copied 1 empty directory to 1 empty directory under C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib
Detected JavaFX Ant API version 1.3
Going to create default keystore in C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\build\nb-jfx.jks
Generating Key for nb-jfx
Launching <fx:jar> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:signjar> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\Login.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derby.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_cs.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_de_DE.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_es.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_fr.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_hu.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_it.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ja_JP.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ko_KR.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_pl.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_pt_BR.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_ru.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_zh_CN.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyLocale_zh_TW.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyclient.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbynet.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbyrun.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\derbytools.jar
Signing (BLOB) C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\dist\lib\jfoenix.jar
Launching <fx:deploy> task from C:\Program Files\Java\jdk1.8.0_60\jre\..\lib\ant-javafx.jar
No base JDK. Package will use system JRE.
JNLP failed : null
java.lang.ArrayIndexOutOfBoundsException
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:570)
at java.lang.StringBuilder.append(StringBuilder.java:190)
at com.oracle.tools.packager.jnlp.JNLPBundler.readTextFile(JNLPBundler.java:391)
at com.oracle.tools.packager.jnlp.JNLPBundler.execute(JNLPBundler.java:547)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:318)
at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:286)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at jdk.nashorn.internal.scripts.Script5$\^eval\_.:program(<eval>:405)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:1465: The following error occurred while executing this line:
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:3017: The following error occurred while executing this line:
C:\Users\sachi\OneDrive\Documents\NetBeansProjects\Login\nbproject\jfx-impl.xml:2055: Error: Bundler "WebStart JNLP Bundler" (jnlp) failed to produce a bundle.
BUILD FAILED (total time: 5 seconds)
我自己找到了答案。
jnlp 文件没有任何问题。
我已经回答了我自己提出的一个有同样问题的问题。