I have a class that that sits in a package called com.toptur.sysTray all it does is load system tray it does not use any external packages. i create a SysTray object to install the system tray. Everthing builds fine. i can run the application from command line and systray gets installed. But when i try to create a jar from the class files and run it i get NoClassDefFoundError.
Package and its class files are in the jar my application does not use ant external jars. just classes provied by java.
And if build a .exe file out of the jar, it starts to work again without any errors.
How can i track this down?
<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 create the jar file from a ant target using above code. driver program is not in a package. its located in gotacan.java
I run it using java -jar toptur.jar
rest of the program works it only throws exception when i try to use that package.