From: G. M. <glo...@gm...> - 2008-05-28 13:52:06
|
Hi all! I am creating my project using geotools2.0 in *Eclipse*. When I export it to an executable jar file (through eclipse) the jar file does not work. When double-clicked I have: "* *Could not find the main class. Program will exit. " and running from command-line I have: "Exception in thread "main" java.lang.NoClassDefFoundError: org/geotools/map/MapContext Caused by: java.lang.ClassNotFoundException: org.geotools.map.MapContext at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source)". When the project is run within Eclipse IDE everything works. My manifest file has the following lines: Manifest-Version: 1.0 Class-Path: jars/geoapi-1.1.0alpha.jar jars/geoapi-2.0.jar jars/gt2-ar cgrid-2.1.x.jar jars/gt2-legend.jar jars/gt2-main.jar jars/gt2-shapef ile.jar jars/gt-legend.jar jars/jai_core.jar jars/jlfgr-1.0.jar jars/ JTS-1.6.jar jars/opengis-css-0.1.jar jars/sample-data.jar jars/units- 0.01.jar jars/vecmath-1.3.jar Main-Class: shapefileSimplification.GUI where GUI is the class containing the 'main()' method. Thanks in advance for any help. |