Unrecognized option error for java in mac

broken image

If the -jar option is specified, its argument is the name of the JAR file containing class and resource files for the application. In the latter case, the launcher constructs an instance of the Application class, calls its init() method, and then calls the start() method.īy default, the first argument that is not an option of the java command is the fully qualified name of the class to be called. The java command can be used to launch a JavaFX application by loading a class that either has a main() method or that extends. The method declaration has the following form: The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. It does this by starting the Java Runtime Environment (JRE), loading the specified class, and calling that class's main() method.

broken image

The java command starts a Java application.