A 64-bit capable JDK currently ignores this option and instead uses the Java Hotspot Server VM.įor default Java VM selection, see the Server-Class Machine Detection page at -server In addition, the current implementations of the virtual machines support a set of nonstandard options that are subject to change in future releases.
The launcher has a set of standard options that are supported in the current runtime environment. Non-option arguments after the class name or JAR file name are passed to the main function. The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path. If the -jar option is specified, then the first non-option argument is the name of a JAR file containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header. A fully qualified class name should be used. The method declaration has the following form:īy default, the first argument without an option is the name of the class to be called.
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 a Java runtime environment, loading a specified class, and calling that class's main method. The java command starts a Java application. The arguments passed to the main function.