IDE Tutorials CSE 219 Fall 2005 |
![]() |
TOC: AkA Tactical Operations Center |
![]() |
|||||||||||||||||||
|
|||||||||||||||||||||
The idea behind jars is that they allow to make a nice compact package for distributing your program. In netbeans it is rather easy to do this,
http://www.netbeans.org/
![]() |
The Opening |
![]() |
|
| The first step in creating a jar is setting the main project. If your workspace has more then one project you need to goto file, and then set main project. | |||

![]() |
What to run? |
![]() |
|
| Once you have the main project set select the project and then goto file project properties for projectname. In here we will tell the jar what to run. | |||

![]() |
Selecting the main class |
![]() |
|
| In here click running project and then click browse for main class and select your class. This is the one that netbeans will use to run the project and the jar will use to run. | |||

![]() |
Almost done |
![]() |
|
| Once we select the main class we are done here so click finish and then we can move on. | |||

![]() |
Creating the jar |
![]() |
|
| Creating jar is as simple as building the project. Since we want a full set of new classes what we want to do is goto build and then click clean and build main project. This will create a jar file for us also. | |||

![]() |
And we are done. |
![]() |
|
| Assuming the program built properly we should now be done. You will find the path for your jar file in the output window of netbeans. | |||
