Problem unjarring plugins on Mac OS X

I’'m using Eclipse 3.2 to develop a plugin for Spark. I successfully compile and build the jars for the plugin using the ant scripts on Windows. Spark and my plugin start and run fine under Windows. When I took my build over to a Mac running OS X 10.4 and tried to run, I received the following:

java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.(JarFile.java:97)

at org.jivesoftware.spark.PluginManager.unzipPlugin(PluginManager.java:536)

at org.jivesoftware.spark.PluginManager.expandNewPlugins(PluginManager.java:466)

at org.jivesoftware.spark.PluginManager.loadPublicPlugins(PluginManager.java:474)

at org.jivesoftware.spark.PluginManager.loadPlugins(PluginManager.java:162)

Furthermore, all of the .jar files in the plugin folder now have 0 kb size.

I tried building on the Mac, but got the same results.

Can anyone shed light on what’'s happening, why, and how to fix it?

Thanks.

  • Jasen.

Strange. I haven’'t tried any of my Spark plugins on the Mac, but I have copied many jar files that were built on Windows to the Mac with no issues.

Have you tried to manually unjar the file on the Mac to see what is in it? Either do jar -tf <jarname> to list the contents or jar -xf <jarname> to extract them.

Running “jar” as in your example works fine.

  • Jasen.