Building your Java project into executable in NetBeans

Okay, you created your graphics application abd already knows how to do multiple applications.

But you want to show to the whole world yours fantatics programs, how to do? Will send the project folder to the others? Will send them to download NetBeans to run yours programs in Java?

Of course not. You have to do the build and send your program all ready to be used for the world.
We will show how to make yours Java project in executables.

Have you noticed that whenever you create a NetBeans project you choose a location and name, in the 'Project Location'?

Have you had the curiosity to go and take a poke around in the files that exist and are created pro functioning of your Java applications?

Learn how to make the build process for Java in Netbeans, which will make your Java programs become executable on the computer of other people.

Did you know that every day, you use dozens of Java applications?
And how often saw these folders and files with .java, .xml and .class?

Now, if you never had to use, will not need to be sending that other people.
I will now show one of the many ways a person without NetBeans, run your Java applications.

Clean and Build Project in NetBeans

Open your project. For example, the application of the last example, which calculates for you the roots of a quadratic equation in a graphical way.
Perfect to send it to yours buddies or family.

You know the play button that you click to run the programs you here of Java Progressive cours.
Ever wondered what it's for those other buttons around?

Well, let's use the 'broom' with 'hammer', which is next door, on the left:

This option will 'clean' and 'build' your application (Clean and Build Main Project), ie, will straighten, add classes, pictures and everything else that you have used in your application and put everything in a single file extension .jar
You've probably seen files with .jar when downloaded games or mobile apps.
They are the same, but now you will create one :)

Inside this file, all files and configurations will be stored for a person who has the JRE can run your Java application.

This file is located in the folder/directory 'dist' that was created during the building process.
Go there and click .jar, this should make your program run without NetBeans.

Now send and sell their applications, get rich and do not forget the Progressive Java course :)

No comments: