Results 1 to 6 of 6
- 04-01-2011, 08:50 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
JCreator build executable jar file
Hi All,
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 : ""
added manifest
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%)
Process completed.
================================================== ==============================
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.
Regards
Chuo
- 04-01-2011, 08:55 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
- 04-01-2011, 09:28 AM #3
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
Hi Jos,
i dont really get you.
Exception in thread "main" java.lang.NoClassDefFoundError: JOINFILE/class
Caused by: java.lang.ClassNotFoundException: JOINFILE.class
this error message come after i type ( java -jar JOINFILE.jar)
The jar file are is been created but cannot run.
- 04-01-2011, 09:35 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,603
- Blog Entries
- 7
- Rep Power
- 17
- 04-01-2011, 09:35 AM #5
Senior Member
- Join Date
- Apr 2010
- Location
- Dhaka,Bangladesh
- Posts
- 178
- Rep Power
- 0
In your menifest did you mention your main class? I think not.
please edit your menifest.txt.
There must be:
RegardsJava Code:Main-Class: JOINFILE
Ujjal
- 04-01-2011, 09:47 AM #6
Member
- Join Date
- Apr 2011
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
create windows executable using executable jar file
By sarwar1234 in forum New To JavaReplies: 2Last Post: 02-07-2011, 08:29 PM -
Executable jar file
By franklyn@bellsouth.net in forum New To JavaReplies: 12Last Post: 08-26-2010, 01:03 PM -
Executable File.
By BeeGee in forum Advanced JavaReplies: 13Last Post: 05-25-2010, 12:35 PM -
jar file in JCreator
By jadaleus in forum Advanced JavaReplies: 2Last Post: 10-22-2008, 11:07 PM -
Executable Application, use JCreator
By baltimore in forum New To JavaReplies: 1Last Post: 07-31-2007, 06:03 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks