我有一個程序,我一直在寫使用WebStart,我似乎遇到了一個問題。我注意到無論我做什麼,我都無法讓WebStart下載操作系統特定的jar。JNLP不下載操作系統資源
下面你會看到我的JNLP文件。你看看資源你會注意到我有一些操作系統和架構獨立的瓶子,然後我有一些操作系統相關的罐子和nativelibs。
目前,核心文件夾和通用文件夾中的所有內容都將正確加載,但沒有其他功能。如果我製作一個單獨的jnlp文件來鏈接我的電腦所需的所有內容,它將會下載並加載得很好(有很少的打嗝)。
這是我的JNLP文件,你看到什麼可能是錯的?
<?xml version='1.0' encoding='utf-8' ?>
<jnlp
spec="1.0+"
codebase="http://xxxx.xxxxxxxxxxxxxxxx.xxx/java/"
href="MyApp.jnlp?k=14&d=dGMDES%2Bgs0A3d03HbVKkD4T7ONIby1a5NZGMVkwHzsV7tydBs2eoPvyHfeXlNpcxD8H8Wt1kRePtxBuOswZ%2FxA%3D%3D">
<information>
<title>Program Name</title>
<vendor>Company</vendor>
<description></description>
<description kind="short"</description>
</information>
<update check="always" policy="always" />
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se" />
<property name="sun.awt.disableMixing" value="false"/>
<jar href="core/Utilities.jar" size="146289" main="false" download="lazy" />
<jar href="core/DPFP.jar" size="40239" main="false" download="lazy" />
<jar href="core/SigPad.jar" size="8293" main="false" download="lazy" />
<jar href="core/SoapService.jar" size="741035" main="false" download="lazy" />
<jar href="core/Marketing.jar" size="857781" main="false" download="lazy" />
<jar href="core/App.jar" size="1172429" main="true" download="eager" />
<jar href="core/Element.jar" size="506791" main="false" download="lazy" />
<jar href="universal/ekitspell.jar" size="330488" main="false" download="lazy" />
<jar href="universal/DJNativeSwing.jar" size="111941" main="false" download="lazy" />
<jar href="universal/DJNativeSwing-SWT.jar" size="580006" main="false" download="lazy" />
<jar href="universal/SigPlus2_57.jar" size="125633" main="false" download="lazy" />
<jar href="universal/japura.jar" size="296730" main="false" download="lazy" />
<jar href="universal/miglayout15-swing.jar" size="81697" main="false" download="lazy" />
<jar href="universal/ekit.jar" size="171833" main="false" download="lazy" />
<jar href="universal/RXTXcomm.jar" size="67856" main="false" download="lazy" />
<jar href="universal/commons-codec-1.7.jar" size="281608" main="false" download="lazy" />
<jar href="universal/json_simple-1.1.jar" size="18827" main="false" download="lazy" />
</resources>
<resources os="Linux">
<nativelib href="lib/linux/SigUsb.jar" size="108657" download="eager" />
<nativelib href="lib/linux/rxtx-native-linux.jar" size="175917" download="eager" />
<jar href="linux/dpfpenrollment.jar" size="334610" main="false" download="lazy" />
<jar href="linux/dpfpverification.jar" size="37114" main="false" download="lazy" />
<jar href="linux/dpotapi.jar" size="67688" main="false" download="lazy" />
<jar href="linux/dpotjni.jar" size="14398" main="false" download="lazy" />
</resources>
<resources os="Mac\ OS">
<jar href="mac/OS/swt_mac.jar" size="1794474" main="false" download="lazy" />
</resources>
<resources os="Mac\ OS X">
<nativelib href="lib/mac/OSX/rxtx-native-macosx.jar" size="111183" download="eager" />
<jar href="mac/OSX/swt_mac.jar" size="1794474" main="false" download="lazy" />
</resources>
<resources os="Windows" arch="x86">
<nativelib href="lib/windows/rxtx-native-windows.jar" size="178321" download="eager" />
<nativelib href="lib/windows/x86/SigUsb.jar" size="39385" download="eager" />
<jar href="windows/dpfpenrollment.jar" size="334610" main="false" download="lazy" />
<jar href="windows/dpfpverification.jar" size="37114" main="false" download="lazy" />
<jar href="windows/dpotapi.jar" size="67688" main="false" download="lazy" />
<jar href="windows/dpotjni.jar" size="14398" main="false" download="lazy" />
<jar href="windows/x86/swt_windows_x86.jar" size="2007870" main="false" download="lazy" />
</resources>
<resources os="Windows" arch="x86_64">
<nativelib href="lib/windows/rxtx-native-windows.jar" size="178321" download="eager" />
<nativelib href="lib/windows/x86_64/SigUsb.jar" size="48092" download="eager" />
<jar href="windows/dpfpenrollment.jar" size="334610" main="false" download="lazy" />
<jar href="windows/dpfpverification.jar" size="37114" main="false" download="lazy" />
<jar href="windows/dpotapi.jar" size="67688" main="false" download="lazy" />
<jar href="windows/dpotjni.jar" size="14398" main="false" download="lazy" />
<jar href="windows/x86_64/swt_windows_x86_64.jar" size="2064877" main="false" download="lazy" />
</resources>
<application-desc main-class="opt.companyname.app.Main">
<argument>k=14</argument>
<argument>d=dGMDES+gs0A3d03HbVKkD4T7ONIby1a5NZGMVkwHzsV7tydBs2eoPvyHfeXlNpcxD8H8Wt1kRePtxBuOswZ/xA==</argument>
</application-desc>
<security>
<all-permissions/>
</security>
</jnlp>
使用JaNeLa工具來驗證您的JNLP文件 – 2013-03-05 16:27:36
我從來沒有相信工具考慮它說:「 \t \t <全權限/> \t 」是無效的,而根據甲骨文的JNLP語法是正確的(並且我確實下載了JaNeLa的最新版本 –
Pyromanci
2013-03-05 16:40:10
*「It says」 「無效」*這是正確的,它在文件中的順序是錯誤的,因爲是'nativelib'元素,我同意@NikolayKuznetsov先驗證文件 –
2013-03-06 11:42:50