![](/img/trans.png)
[英]jnlp file without .jnlp extension? Is jnlp responsible to launch the sandbox?
[英]Using JNLP File to launch an application
我有一個jsp頁面:
<html>
<head>
<title>Try in JNLP</title>
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var dir = location.href.substring(0, location.href.lastIndexOf('/')+1);
var url = dir + "try.jnlp";
deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>
<noscript>JavaScript is required for this page.</noscript>
</head>
<body>
</body>
</html>
並有一個jnlp文件為:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/try/" href="try.jnlp">
<information>
<title>TRY JNLP</title>
<vendor>TRY JNLP</vendor>
</information>
<resources>
<!-- Application Resources -->
<jar href="TryJNLP.jar" main="true" />
</resources>
<application-desc name="Try JNLP" main-class="tryjnlp.TRYJNLPApp">
</application-desc>
<update check="background"/>
</jnlp>
所有的jar都在各自的目錄中,但是當我雙擊jnlp文件時,它顯示出一條錯誤消息:
java.lang.NoClassDefFoundError: org/jdesktop/application/SingleFrameApplication
其完整的錯誤堆棧。
就像我只是通過雙擊運行我的swing應用程序(TryJNLP.jar)一樣,它運行完美。
請幫我。
由於此代碼似乎依賴於JSR 296,因此有必要在ApplicationFramework-<version>.jar
的運行時類路徑(在JNLP的資源部分)中添加ApplicationFramework-<version>.jar
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.