I usually input command line arguments in Eclipse via run configuration. But I don't know how do achieve the same task in IntelliJ IDEA.
If you want to pass command line arguments then you will have to define the main() function with two arguments. The first argument defines the number of command line arguments and the second argument is the list of command line arguments.
Opening a Terminal Window We can open the terminal window with ⌥F12 on macOS, or Alt+F12 on Windows and Linux. The terminal supports all the same commands that the operating system supports. and press enter. When MongoDB is running in the terminal session, we can go back to writing the application code in the editor.
From the main menu, select Help | Edit Custom VM Options. If you do not have any project open, on the Welcome screen, click Configure and then Edit Custom VM Options. If you cannot start IntelliJ IDEA, manually copy the default file with JVM options to the IntelliJ IDEA configuration directory.
In the Run/Debug Configuration dialog, a new field appeared: Shorten command line. The new field allows you to choose the way the IDE will shorten the command line from a drop-down list: None: This is the default option. The IDE doesn't shorten the long classpath.
ALT+SHIFT+F10, Right, E, Enter, Tab, enter your command line parameters, Enter. ;-)
CTRL+ALT+R, Right, E, Enter, Tab, enter your command line parameters, Enter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With