I have a swing project built with netbean 6.5. I can run the project using IDE, but when I tried to run it in dist directory using command as Readme told
I got exception. In the dist directory, I have
And the MENIFEST.MF in the jar has the contents as follows:
Ant-Version: Apache Ant 1.7.1
Created-By: 1.5.0_10-b03 (Sun Microsystems Inc.)
Class-Path: lib/ws-client-jaxws.jar lib/swing-layout-1.0.3.jar lib/
jaxws-api.jar lib/jaxws-rt.jar lib/log4j-1.2.15.jar
X-COMMENT: Main-Class will be added automatically by build
The exception is:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Well, seems the class "ManagerService" is not found, but it is in the "ws-client-jaxws.jar" under the lib directory. And this jar does not have classpath in its MENIFEST.MF file, so i do not need add this classpath to CardScan jar menifest file.
No, the class javax/xml/bind/JAXBException isn't found, just like the error message says.
What version of Java are you trying to run it with? < 1.6?
Joined: Apr 10, 2009
oh, i see. Thank you David. I add jaxb-api.jar to the lib and new noclassfound for XMLStreamException. I do not know why it works if I run it from netbean? I am using 1.5.0, as shown in menifest.mf, that is what the project use in netbean and the version shown if I use command "java -version". Confused..
subject: Problem about running jar file from netbean dist directory