Main method with multiple parameters?
Answered
Hi,
My Java program uses a main method with (String[] args, Database db) - an additional parameter.
IDEA, however, doesn't seem to like the fact there are two parameters:
Error: Main method not found in class JIMMain, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
Any ideas on how I could get around this issue, or is it not possible with this software?
Please sign in to leave a comment.
"public static void main (String[] args)" is the required entry point signature in Java, it's not a limitation of IntelliJ IDEA.
https://docs.oracle.com/javase/tutorial/essential/environment/cmdLineArgs.html