Results 1 to 7 of 7
Thread: Problem Jar executable files
- 08-12-2009, 09:58 AM #1
Problem Jar executable files
Hi pple,
I have created a GUI project using Netbeans IDE and now i want to distribute my program. Netbeans creates the jar file automatically in the dist folder
When i double click the jar file, my program should start but i get an error for java vietual machine launcher "Could not find main class and the program will exit"What could be the problem with my jar file??
Cheerz!!We Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-12-2009, 11:01 AM #2
There is no problem in your JVM and JAR file.While you build your project you would have mentioned invalid main class,i think.
So open your project and configure properties and then build it.
you will solve the problem certainly..Mak
(Living @ Virtual World)
- 08-12-2009, 11:29 AM #3
Rubbish!
@Manfizy: You have to specify the main class in the manifest file of your jar.
Have a look at the tutorial: Trail: Deployment (The Java™ Tutorials)
- 08-12-2009, 02:07 PM #4
On refering to Netbeans GUI tutorial, i realised that on building my program, apart from the jar file in dist folder, a lib folder should also be created alongside the jar file and the manifest file should designate main class and any libraries that are on the projects path.
In my case, none of the above is done. I dont have the lib folder in PROJECT_HOME/dist folder. Again the manifest file does not have the main class and libraries.
Is it that my settings are not right because from my understanding all this is supposed to be done automatically in Ntbeans? and if so, how can i change them?
Best regards,
manfizyWe Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-13-2009, 09:03 AM #5
Now the manifest file has been updated properly but on clicking the jar file i still get the error "main class not found" ans sometimes nothing happens.
Am so confused now. Anyone who has used netbeans before pls help me on this. I really need to get this program working
cheerz!We Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-13-2009, 12:06 PM #6
Thats the content of the mynifest fileManifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 11.0-b15 (Sun Microsystems Inc.)
Main-Class: XenonConcUI
Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/jf
reechart-1.0.12.jar lib/jcommon-1.0.15.jar lib/AbsoluteLayout.jar lib
/class
Though it could help in trying to figure out the problem
cheerzWe Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-13-2009, 01:15 PM #7
Member
- Join Date
- Aug 2009
- Posts
- 21
- Rep Power
- 0
Similar Threads
-
Packaging all files into a single executable .jar
By ichwar in forum New To JavaReplies: 5Last Post: 01-27-2010, 01:31 AM -
problem communication between 2 files
By Questionmark in forum AWT / SwingReplies: 6Last Post: 07-30-2009, 11:23 AM -
About Executable JAR files
By paluee in forum New To JavaReplies: 4Last Post: 03-31-2009, 07:03 PM -
executable files
By akinpam in forum Advanced JavaReplies: 10Last Post: 01-06-2009, 04:01 AM -
Problem with executing .jar files
By hiranya in forum NetBeansReplies: 2Last Post: 10-02-2007, 07:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks