Computer

Program in Java like a pro thanks to NetBeans

What is NetBeans?

netbeans is an IDE, or integrated development environment, free and open source specially designed for programming in Java. This programming environment was originally created in the year 2000 by the company Sun Microsystems (currently owned by Oracle, and managed by Apache). Today it continues to be one of the most maintained programming environments and with a huge community behind it.

This IDE has always allowed programmers to easily create Java desktop programs as well as tools Java EE and web applications. However, its developers have been able to adapt very well to new technologies, and it also has support for creating HTML5 applications with JavaScript and CSS. And this does not end here, but it also has tools that facilitate the development of applications in languages ​​such as PHP, C and C++.

One of the strongest points of this program is the well-known «NetBeans Platform«. This is a framework, included in this IDE, that greatly simplifies the development of Java Swing applications without the need to install anything or rely on any additional SDKs. Applications created from this platform can dynamically install modules to add additional functionality, such as the possibility of receiving updates from the program itself or adding new functions while it is running. Some of the features that we can control from this platform are:

  • The user interface.
  • User settings.
  • Storage management.
  • The window in which it runs.
  • The assistant framework.
  • The included NetBeans libraries.
  • The IDE tools.

Other very interesting components that we can also find are NetBeans Profiler, for the monitoring and detection of vulnerabilities in the programs, and the GUI Design Tool, for creating interfaces.

How to download and install

As we have already explained, Apache NetBeans is a totally free program for all users and open source. If we are thinking of installing it on our computer, we will be able to do it from any operating system that has support for Java, either Windows What Linux, macOS or BSD, among others. In addition, all the programs that we create with this program will work without problems, and without the need to rewrite them, in any of these systems.

To download this tool, the first thing we must do is access the Apache NetBeans website. In it we will find a link from which we will be able to download the latest version available for this program, as well as the possibility of downloading any previous version, up to 9.0 (when Apache began to take control of the tool) .

Download Apache NetBeans

In addition to downloading this IDE, we will also need download and install the Java JDK on your computerIf we don’t already have it installed. We can download this from here, it has a size of about 150 MB, and if we don’t install it previously, the NetBeans installer will give us an error and won’t let us continue.

Install JDK Windows

In the case of Linux, we can install this programming IDE directly from its official snapd package. To do this we just have to open a terminal and execute the following command in it:

sudo apt update && sudo apt install snapd && sudo apt install netbeans

The download of programming IDE it is approximately 400-500 MB in size. When the download finishes, we can now run the installer to start installing the IDE on the PC. The first thing this will do is check that our computer meets the requirements (and has the JDK installed), and then we will be able to see a window where we can choose the components that we want to be part of the installation.

Installing NetBeans on Windows - 1

The recommended thing, if we don’t want problems, is to install them all (as it comes by default), although we don’t have in mind, at the moment, to use some of them like PHP. But this way, if we need it in the future, we won’t have to do anything else.

In the next step, what we will find will be the license and use terms, which we will have to accept to continue.

Installing NetBeans on Windows - 2

Next, the installer will allow us to choose where we want to install NetBeans. And we can also choose in which directory we have the JDK installed.

Installing NetBeans on Windows - 3

Finally, we only have to see a summary of the installation. And also choose if, during it, we want to search for and download new versions of the program, if any.

Installing NetBeans on Windows - 4

With everything ready, we can start installing the program. The copy and configuration process will take a few seconds, and when it is finished we will have NetBeans ready to start using it.

Installing NetBeans on Windows - 5

Create a new project in Java

Once the program is installed on the computer, we can launch it using the direct access that will appear on the desktop, or from the entry that will have been created in the Start menu.

NetBeans - Interface

To create a new project, and start programming our games, what we must do is click on the «File» menu and choose if we want to create a «New Project» (new project), or simply a «New File» (new archive).

NetBeans - Create New Project 1

We will select the type of project (or file) that we want to create. By default, to avoid filling our hard drive with unnecessary elements, the components necessary for the creation of projects will be disabled in our system. We will have to activate them (and download and install what is necessary) the first time we are going to create a project.

We configure the project and finish with the wizard.

NetBeans - New Project

We already have our new project open in NetBeans, and we can start working with it. Now we can add new files to the project of the type we want, depending on the main objective of our project.

NetBeans - New code file

Once a file has been created, we can finally see the editor and start writing the necessary lines of code so that it fulfills its purpose.

NetBeans Publisher

Now, the limit is set by our imagination. Let’s program!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *