Let's start with a Java project. There is not much configuration to be done with this kind of project, but this will help in familiarizing with the IDE. It will also will give some insight on how to create other, more advanced projects since the flow is almost identical.
If you do not have NetBeans installed on your machine yet, please visit:
It is also necessary to have Java installed; please visit: http://www.oracle.com/technetwork/java/javase/downloads/index.html
HelloWorld
. helloworld.Main
, giving com.helloworld.Main
.The configuration window should look like the following screenshot:
While the project location can be specified, since we did not change the folder, NetBeans automatically adds the project to NetBeansProjects, which is the NetBeans default project folder.
Use dedicated Folder for Storing Libraries is marked since we would like to have a specific project folder where all of the libraries will be stored, making packaging and distribution easier in the future. Libraries are packaged as JAR files. A JAR file is an example of a library that contains Java sources, which enable the developer to extend the functionality of applications.
NetBeans will automatically generate a main class called Main, add a main()
method, and generate default comments through the class when the Create Main Class option is marked.
NetBeans will create the package structure, which will consist of Source Packages and Test Packages. The code templates provided by the IDE will correctly place the files in their respective folders. For example, if one JUnit test is created, the file will be placed under the Test Packages folder automatically.
One node containing libraries will also be shown in the projects view. This is where NetBeans will copy the necessary libraries. In the Java project, for example, NetBeans copies and configures the JUnit libraries into our newly-created project by default. Different projects will have different dependencies.
3.17.154.16