I have an application created in Maven as a complete jar which runs on most platforms (Windows, Unix, some Mac) but not on Mac lion/10.6, failing with the error
java –jar jumbo-converters-crystal-cif-0.3-SNAPSHOT-jar-with-dependencies.jar 0151.cif 0151.cml
Exception in thread "main" java.lang.NoClassDefFoundError: ?jar
Caused by: java.lang.ClassNotFoundException: ?jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
UPDATE: the MANIFEST.MF contains:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: pm286
Build-Jdk: 1.6.0_24
Main-Class: org.xmlcml.cml.converters.cif.CIF2CMLConverter
SOLUTION: @Charlie is right. This error occurred in a class. Most delegates had no problems. The “culprit” is Powerpoint. I was required to make my material available as Powerpoint (not my normal practice) and it had “helpfully” converted HYPHEN-MINUS (U+002D) to EN_DASH. Most delegates typed this normally, but some cut and pasted the corrupt command.
The problem is the command you’re using to execute
is wrong… it should be:
(It might not be apparent but the first one is an ‘EN DASH’ (U+2013) before the
jarand the second is a hyphen.)