1

I'm trying to use jWrapper with Java 8, but I don't understand how to set up the JREs.

As a test I specified (I'm On Mac OS X 10.8.5) on my JWrapper config .xml file:

<Mac64JRE>/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/</Mac64JRE> 

but this ends with exception like this:

[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)

Some people apparently have managed to use Java 8 but I've not bee able to find any specifics, so I'm looking for a spelled out instructions….


edit: more info

This morning I renamed the file:

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/jar

to

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/jar-orig

and it appears that JWrapper then just skips the file and the build completes and everything seems ok.

However when I try to launch the resulting 64 bit Mac OS X .app file it fails without an error message after some tens of seconds.

Looking at the log in:

/Users/nyholku/Library/Application Support/JWrapper-MyApp/logs

I see that the launch fails with:

+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!

Going back to basic I erased everything JWrapper related and started from scratch:

-downloaded JWrapper -downloaded sampleapp -downloaded jre-17 pack

put them all into one directory, executed:

java -Xmx2048m -jar jwrapper-00031607960.jar sampleapp/jwrap

the build finished successfully but the 64 bit Mac .app from the .dmg fails to launch and the log shows:

+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!

So even the out-of-the-box JWrapper on their own samppleapp fails on this machine.

I conjecture the error 'Launch Error 13' is 'permission denied' because doing 'ls' on the 'unpack200' gives:

-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

Also it looks a bit suspect that (again conjecture based on the log) there apparently are three parameters ('[Spawner] Appended argument …') given to the 'unpack200' because it only takes two. In fact trying to unpack (just to debug) from the command line works with the two last parameters but not with the three.

I find it hard to believe that there would be this sort of bug in JWrapper so I must be doing something wrong or there is something wrong with my system. Maybe need to check disk permissions or something.

1 Answer 1

2

Rebooted to my Maverick partition and everything worked!

Rebooted back to Mountain Lion and everything worked!

My conclusion: some abortive attempts to compile/launch had left some garbage around that prevented JWrapper from working.

Being a Mac user I'm not used to rebooting ;) and hence I did not try that!

Conjecture, which I was too late verify because I had rebooted:

JWrapper uses the .dmg disk images on Mac and I may have not ejected or the eject failed when I did my test so maybe the JWrapper launcher thingy tried to load stuff from the wrong disk image … I've seen it often that on Mac OS even if the disk image is not visible on the Desktop you can still see it mounted in the '/Volumes'

Final note. When I say everything worked I'm not implying that Java 8 works for me but now that the sample app works I think it is time to close this question.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.