These steps will allow you to create java executable that will run just by double clicking the file.
»Create JFrameForm with GUI swing components in a project in NetBeans IDE or Open a existing one.
»Run the file to check for any errors(Shift + F6).
»Now in the source code find the line public static void main(String args[]) {
» Copy the text under it till its closing brace.
» Now open the main class of the package in which the JFrameForm lies.
» In the main class find the same line as earlier and paste the text below it.
» Now Clean and build your main project
» Now locate the file (mostly in the dist folder of the Project).
» Double click the file to see it running…….!!!
//You can see a video tutorial for this on Videos Page
If this post helped you, just give your few seconds for sharing it and let others be helped too.
i created a jar file of my j fram using
http://www.youtube.com/watch?v=LF5cLVivV_Y
and got the error:
Java Virtual Machine Launcher:
Could not find the main class:****.Program will exit
please some one help me with it
also i am a school student and a beginner so please explain in simple language
@utsav You are in 11th or 12th?
Are your files are placed in 'default package' , if yes create a new package and move your frame and main class to it using refactor.
If still the problem persist,
» Update your JRE to latest version
» Ensure that there were no errors at compile time an try rebuolding your project
@Anonymous
You can refer to this post Java Database Connectivity : Searching Data
hello. I wanted to know if it is possible to create jar file of a netbean project if a mysql database has been attached to it. can it be done through the above mentioned process or should i use other embedded databases like java db or sqlite???