I have a class that is in the com.toptur.sysTray package, all it does is the boot system tray, it does not use any external packages. I am creating a SysTray object to set up the taskbar. Everthing builds great. I can run the application from the command line and install systray. But when I try to create a jar from class files and run it, I get a NoClassDefFoundError.
The package and its class files are in the bank; my application does not use external ant containers. just classes defined by java.
And if you create a .exe file from a jar, it starts working again without errors.
How can I track this?
<target name="jar" depends=""> <jar destfile="build/toptur.jar" > <manifest> <attribute name="Built-By" value="Toptur"/> <attribute name="Main-Class" value="gotacan"/> </manifest> <fileset dir="build"> <include name="**/*.class"/> <include name="**/*.png"/> <exclude name="**/*.jar"/> </fileset> </jar>
I am creating a jar file from an ant target using the above code. The driver program is not included in the package. its located in gotacan.java
I run it with java -jar toptur.jar
the rest of the program works, it only throws an exception when I try to use this package.
Gotacan toptur
source share