Creating Java Project Without Maven in Apache NetBeans (11 and Higher)
Last Updated :
03 Mar, 2021
In this article, you will find the steps to create a simple Java Project without Maven in Apache NetBeans (v 11 and higher). Since maven has launched, the creation of Java Project directly has been shifted under the "Java with Ant", due to which the geeks who upgrade themselves to the new Apache NetBeans face problem finding the option to create a simple Java Project i.e. without maven.
The description says :- In Java Application of Java with Ant you are
Creating a new Java SE application in a standard IDE project. You can also generate a main class in the project. Standard projects use an IDE-generated Ant build script to build, run, and debug your project.
Follow the steps provided below to achieve the same:
Step 1: Creating your simple Java Project
Step 1.1 - Right-click on the File option in the navigation bar.
Step 1.2 - Click on the Create new project. (Shortcut key for the same is - Ctrl+Shift+N)
Step 1.3 - Under categories choose Java with Ant.
Step 1.4 - Under Projects choose Java Application.
Step 1.5 - Click Next.
Step 1.6 - Provide the package name such as "com.packagename"(this is the standard to write a package name).
Step 1.7 - Only check the checkbox of Create main class if you want a default class containing the main() function in your project.
Step 1.8 - Finish.



After clicking on Finish, your project will be created.
Step 2: To create a java package inside a project.
Creating classes in the default package provided by the IDE is not said to be a good practice. Thus, it is generally advised to create your own package.
A package generally has a name like “com.mypackage”, it is because in practice the package name is kept as the reverse of the company domain. For example :- If a company has a domain of “historyclass.com” then the package name will be like “com.historyclass” and following sub-topics such as world history, Indian history, etc.
Step 2.1 - Expand your created project and left-click on Source Packages.
Step 2.2 - Click on New.
Step 2.3 - Choose the Java Package.
Step 2.4 - Provide the name of the package such as “com.packagename”.
Step 2.5 - Click on Finish.


The package will be created under the Source Packages.
Step 3: To create a Java Class in any package.
Step 3.1 - Left-click on the package in which you want to create the java class.
Step 3.2 - Click on New.
Step 3.3 - Choose the Java Class.
Step 3.4 - Provide the name of the class such as “MyClass”.
Step 3.5 - Click on Finish.



By now, we have successfully created a Java Project, Java Package and Java Class.
Similar Reads
Adding MySQL Connector to the Java Project in Apache NetBeans Adding MySQL Connector Java to the Java Project sometimes creates a fuss for the programmer. In this article, we have provided the steps to install MySQL Connector JAR file using the Connector/J driver and add the MySQL Connector/J to your project. Note: Before downloading the MySQL connector, you s
2 min read
How to Create an Apache Kafka Project in IntelliJ using Java and Maven? Apache Kafka allows you to decouple your data streams and systems. So the idea is that the source systems will be responsible for sending their data into Apache Kafka. Then any target systems that want to get access to this data feed this data stream will have to query and read from Apache Kafka to
3 min read
How to Create a Project In NetBeans GUI? All Java Development in the IDE takes place within Projects, we first need to create a new project within which to store sources and other project files. An IDE project is a group of JAVA Source files plus its associated metadata (data about data), including project-specific properties files, and ma
2 min read
How to Create a Maven Project in IntelliJ IDEA? Maven is a powerful project management tool based on POM (project object model). It is used for project build, dependency, and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT. In the short term, we can tell maven is a tool that can build and manage any J
3 min read
How to Create a Maven Project in Eclipse IDE? Maven is a powerful project management tool that is based on POM (project object model). It is used for project build, dependency, and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT. In short terms we can tell maven is a tool that can be used for buildi
2 min read
Create a New Maven Project from Command Prompt Maven is a powerful project management tool that is based on POM (project object model). It is used for projects build, dependency and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT.In short, maven is a tool that can be used for building and managing an
2 min read
Creating First Servlet Application using NetBeans IDE Servlets are the Java programs that run on the Java-enabled web server or application server. They are used to handle the request obtained from the webserver, process the request, produce the response, then send a response back to the webserver. NetBeans is an integrated development environment (IDE
2 min read
How to Create Jar File for Java Project in Eclipse? Java programmers already know about what is a jar file if you are new then first understand what is a jar file. Once you are completed your project in Eclipse the next task is to create a runnable version of your project. Eclipse support only exporting the JAR (.jar) file, not the Executable (.exe)
3 min read
How to Create a Selenium Maven Project with Eclipse to Open Chrome Browser? Maven is a Yiddish word meaning accumulator of knowledge, Maven is a build automation tool. It is a software project management and comprehension tool that can manage the projectâs build, reporting, and documentation. Selenium is an open-source popular web-based automation tool. The major advantage
3 min read
Configuration of Apache Tomcat Server with Eclipse IDE In this article, we will discuss a step by step guide to setup Apache Tomcat server in Eclipse IDE. Eclipse IDE: Eclipse is an open-source Integrated Development Environment that is popular for Java application development (Java SE and Java EE) and Android apps. It also supports C/C++, PHP, Python,
2 min read