In this tutorial, you will learn how to run a Java program with arguments in NetBeans.
I am demonstrating the method, in which I feel convenient, and I am using it to pass the parameters to a Java program.
If you know some better method, then please mention it in the comment section below.
Run Java Program with Arguments in NetBeans
- In NetBeans, do the right click on the Java program/class in the Java project navigator and then click on the Tools > Open in Terminal, as shown in the below image:
- The terminal window will open in the below section of NetBeans.
- There you can compile your Java program and run with arguments as shown in the below image:
See also:
- How to Add External JAR File in NetBeans Project?
- How to Connect Oracle Database in Java Using NetBeans?