jar -cfvm client.jar ClientManifest scjd\starting\suncertify\client\*.*
Start your jar file creation at the starting level and this problem will go away. What's happening is your files package structure is looking like this starting.suncertify.... You want your jar file package to start at suncertify, so cd into your starting directory and run your previous command from there.
-Matt<br /> SCJP2<br /> SCJD
Joined: Jan 07, 2003
Thank you, but now I get the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: suncertify/gui/Startu pDialog at suncertify.client.FlightdataPresenter.<init>(FlightdataPresenter.java :20) at suncertify.client.FlightdataPresenter.main(FlightdataPresenter.java:3 9)
Although StartupDialog is in gui.jar and gui.jar is in classpath. Thank you Garandi [ January 13, 2003: Message edited by: Garandi Garandi ]
Garandi, The Main-Class line in your mainfest file is a path, not a package name. It should look like this: Main-Class: suncertify/client/FlightdataPresenter Note the use of / instead of . Ken Krebs, a.k.a kktec SCJP 1.4
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Originally posted by Garandi Garandi: Exception in thread "main" java.lang.NoClassDefFoundError: suncertify/gui/StartupDialog
Well? Is this class in your jar or not? If you constructed the jar using jar -cfvm client.jar ClientManifest scjd\starting\suncertify\client\*.* Then it will contain only the client package and subpackages. Make sure you include all classes you will need in the jar. You can view the contents of a jar using the t flag: jar -tf client.jar HTH - Peter
Joined: Jan 07, 2003
Exception in thread "main" java.lang.NoClassDefFoundError: suncertify/gui/StartupDialog
StartupDialog.class is in a different jar file, namely gui.jar, and I have gui.jar in my classpath. Thank you Garandi
Peter den Haan
Joined: Apr 20, 2000
Originally posted by Garandi Garandi: StartupDialog.class is in a different jar file, namely gui.jar, and I have gui.jar in my classpath.
That last point is irrelevant. From the java tool documentation in the JDK: -jar Execute a program encapsulated in a JAR file. [...] When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. You will have to use a Class-Path manifest attribute. - Peter