try {
Class cls = Class.forName(START_CLASS);
- Method m = cls.getMethod("main", String[].class);
+ Method m = cls.getMethod("main", new Class[] {String[].class});
m.invoke(null, new Object[] { args });
} catch (ClassNotFoundException e) {
e.printStackTrace();
- error("Error starting main class!", "Please report a bug.");
+ error(new String[] {"Error starting main class!", "Please report a bug."});
} catch (NoSuchMethodException e) {
e.printStackTrace();
- error("Error starting main class!", "Please report a bug.");
+ error(new String[] {"Error starting main class!", "Please report a bug."});
} catch (InvocationTargetException e) {
e.printStackTrace();
- error("Error starting main class!", "Please report a bug.");
+ error(new String[] {"Error starting main class!", "Please report a bug."});
} catch (IllegalAccessException e) {
e.printStackTrace();
- error("Error starting main class!", "Please report a bug.");
+ error(new String[] {"Error starting main class!", "Please report a bug."});
}
}
if (major < REQUIRED_MAJOR_VERSION ||
(major == REQUIRED_MAJOR_VERSION && minor < REQUIRED_MINOR_VERSION)) {
- error("Java SE version 6 is required to run OpenRocket.",
+ error(new String[] {"Java SE version 6 is required to run OpenRocket.",
"You are currently running " + jreName + " version " +
- jreVersion + " by " + jreVendor);
+ jreVersion + " by " + jreVendor});
}
} catch (RuntimeException e) {
- confirm("The Java version in use could not be detected.",
+ confirm(new String[] {"The Java version in use could not be detected.",
"OpenRocket requires at least Java SE 6.",
- "Continue anyway?");
+ "Continue anyway?"});
}
String jreVersion = System.getProperty("java.runtime.version", "(unknown)");
String jreVendor = System.getProperty("java.vendor", "(unknown)");
- confirm("OpenJDK is known to have problems running OpenRocket.",
+ confirm(new String[] {"OpenJDK is known to have problems running OpenRocket.",
" ",
"You are currently running " + jreName + " version " +
jreVersion + " by " + jreVendor,
- "Do you want to continue?");
+ "Do you want to continue?"});
}
}
*
* @param message an array of messages to present.
*/
- private static void error(String ... message) {
+ private static void error(String[] message) {
System.err.println();
System.err.println("Error starting OpenRocket:");
*
* @param message the message Strings to show.
*/
- private static void confirm(String ... message) {
+ private static void confirm(String[] message) {
if (!GraphicsEnvironment.isHeadless()) {
JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION) {
System.exit(1);
}
-
}
-
}
-
}