JCreator build executable jar file
I had finish wrote a java script using JCreator LE. Now i want to build it into executable jar file. I had search a lot info on build a jar file, and follow all the step a mention.
I still newbie on java so my coding having so redundant code. But it still able to run and output the result i want.
I had create a manifest.txt with my main class and end with new line. As show below:
--------------------Custom Tool: Create Jar File--------------------
Command : "C:\Program Files\Java\jdk1.6.0_24\bin\jar.exe" cvfm output.jar manifest.txt *.class
Directory : ""
adding: JOINFILE$1.class(in = 942) (out= 596)(deflated 36%)
adding: JOINFILE$2.class(in = 942) (out= 593)(deflated 37%)
adding: JOINFILE$3.class(in = 653) (out= 444)(deflated 32%)
adding: JOINFILE$ButtonHandler.class(in = 972) (out= 558)(deflated 42%)
adding: JOINFILE.class(in = 14232) (out= 6647)(deflated 53%)
After this run i have a jar file created, but nothing show when i double click it.
When i run the jar using CMD it prompt:
Exception in thread "main" java.lang.NoClassDefFoundError: JOINFILE/class
Caused by: java.lang.ClassNotFoundException: JOINFILE.class
at java.net.URLClassLoader$1.run(unknow source)
at java.security.AccessController.doPrivileged(Native Menthod)
at java.net.URLClassLoader.findClass(unknow Source)
Count not find the main class: JOINFILE.class. program will exit.
But inside the jar file the JOINFILE.class are inside, with correct menifest.mf file.
I had spend a lot of time writing this script but end up can run it as application.
I wanted to vomit blood already.
Any expert pls do help me up.
You can remote to my notebook if you free.
My email address is; Chungseng83@yahoo.com
God bless you all.