我正在尝试将jWrapper与Java 8结合使用,但是我不了解如何设置JRE。
作为测试,我在JWrapper config .xml文件中指定了(我在Mac OS X 10.8.5上):
<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相关的内容,并从零开始:
下载的JWrapper
下载的sampleapp
下载的jre-17包
将它们全部放在一个目录中
执行:
java -Xmx2048m -jar jwrapper-00031607960.jar sampleapp / jwrap
构建成功完成,但是.dmg中的64位Mac .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
另外,似乎有点怀疑(再次基于对数进行猜想),显然给“ unpack200”提供了三个参数(“ [Spawner]附加参数…”),因为它只需要两个。实际上,尝试从命令行解压缩(仅用于调试)对最后两个参数有效,但对三个不起作用。
我很难相信JWrapper中会出现这种错误,因此我必须做错了某些事情,或者我的系统出了点问题。可能需要检查磁盘权限或其他内容。
最佳答案
重新启动到我的Maverick分区,一切正常!
重新启动回山狮,一切正常!
我的结论是:某些不合要求的编译/启动尝试使JWrapper无法正常工作。
作为Mac用户,我不习惯重新启动;),因此我没有尝试过!
我已经太迟了,因为我重新启动了,所以我猜想一下:
JWrapper在Mac上使用.dmg磁盘映像,并且当我进行测试时我可能没有弹出或弹出失败,因此JWrapper启动器可能试图从错误的磁盘映像中加载内容……我在Mac OS上经常看到这种情况即使磁盘映像在桌面上不可见,您仍然可以看到它已安装在“ /卷”中
最后说明。当我说一切正常的时候,并不是说Java 8对我有用,但是现在示例应用程序可以工作了,我认为是时候解决这个问题了。