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:
![Open terminal in Java.](https://www.vinish.ai/wp-content/uploads/2019/05/Java-terminal-option-637x1024.png)
- 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:
![NetBeans - Terminal](https://www.vinish.ai/wp-content/uploads/2019/05/Java-terminal-in-netbeans-1024x197.png)