我試圖在Java 8中使用jWrapper,但我不明白如何設置JRE。JWrapper示例應用程序無法在Mac OS X上啓動10.8.5
作爲一個測試,我指定的(我在Mac OS X 10.8.5)在我JWrapper配置.xml文件:
<Mac64JRE>/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/</Mac64JRE>
但除了像這樣這樣結束:
[Archive] Adding file (99376) (Contents/Home/bin/jar) /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/jar
**********************************
* BUILD FAILED *
**********************************
** Reason: (see stacktrace below)
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:128)
at java.util.jar.JarFile.<init>(JarFile.java:136)
有些人顯然已經設法使用Java 8,但我不是蜂 能夠找到任何細節,所以我正在尋找拼寫指示...。
編輯:更多信息
今天上午,我重命名的文件:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/jar
到
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/jar-orig
,看來,JWrapper則只是跳過的文件和構建完成並且 一切似乎都沒問題。
但是,當我嘗試啓動生成的64位Mac OS X .app文件時,它會在幾十秒後沒有錯誤消息而失敗 。
查看日誌中:
/Users/nyholku/Library/Application Support/JWrapper-MyApp/logs
我看到發射失敗:
+0 [ExtractArchiveFile] Extracting Contents/MacOS/libjli.dylib (::0)
+0 [ExtractArchiveFile] Extracting to /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/MacOS/libjli.dylib
+0 [ChMod] Executing chmod -R 755 "/Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/MacOS/libjli.dylib"
+2 [ExtractArchiveFile] Extracting Contents/Home/db/lib/derby.jar (::2)
+1 [ExtractArchiveFile] Extracting to /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/db/lib/derby.jar.p2
+9 [ChMod] Executing chmod -R 755 "/Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/db/lib/derby.jar.p2"
+4 [Spawner] Creating spawner
+0 [Spawner] Setting spawner exe to /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/bin/unpack200
+0 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/bin/unpack200
+0 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/db/lib/derby.jar.p2
+1 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/db/lib/derby.jar
+0 Launch Error 13.
+0 [ExtractArchiveFile] ERROR: unpack200 (/Users/nyholku/Library/Application Support/JWrapper-MyApp/JWrapperTemp-1414997025-7-app/Contents/Home/db/lib/derby.jar) does not exist!
讓我們回到基本的我抹去一切JWrapper相關,從頭開始:
-downloaded JWrapper -downloaded sampleapp -downloaded JRE-17包
把他們都到一個目錄, 執行:
的java -Xmx2048m -jar jwrapper-00031607960.jar sampleapp/jwrap
構建成功完成,但64位從蘋果的.dmg的.app無法啓動和日誌顯示:
+1 [ChMod] Executing chmod -R 755 "/Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Resources/zh_TW.lproj/Localizable.strings"
+2 [ExtractArchiveFile] Extracting Contents/Home/lib/alt-rt.jar (::2)
+1 [ExtractArchiveFile] Extracting to /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/lib/alt-rt.jar.p2
+0 [ChMod] Executing chmod -R 755 "/Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/lib/alt-rt.jar.p2"
+3 [Spawner] Creating spawner
+0 [Spawner] Setting spawner exe to /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/bin/unpack200
+0 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/bin/unpack200
+0 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/lib/alt-rt.jar.p2
+1 [Spawner] Appended argument /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/lib/alt-rt.jar
+0 Launch Error 13.
+0 [ExtractArchiveFile] ERROR: unpack200 (/Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/lib/alt-rt.jar) does not exist!
所以連出的即裝即用自己的samppleapp JWrapper失敗,這臺機器上。
我猜想錯誤「啓動錯誤13」是「權限被拒絕」,因爲在「unpack200」做「LS」給出:
-rw-r--r-- 1 nyholku staff 103216 4 Nov 07:05 /Users/nyholku/Library/Application Support/JWrapper-SampleApp/JWrapperTemp-1415077515-5-app/Contents/Home/bin/unpack200
而且它看起來有點懷疑(再次猜想基礎上, log)顯然有三個參數('[Spawner]附加參數...')給'unpack200',因爲它只需要兩個參數。事實上,試圖從命令行解壓縮(僅用於調試)與最後兩個參數一起工作,但不與三個參數一起工作。
我覺得很難相信JWrapper會出現這種錯誤,所以我必須做錯某些事情或者我的系統出現問題。也許需要檢查磁盤權限或什麼的。
所以你應得的+1 ... – 2014-11-04 05:51:26