* Starts this application.
*
* @param args the command-line arguments
*/
public void start(String[] args) {
BrowserFrame frame;
ArrayList list;
String str;
// Check command-line arguments
for (int i = 0; i < args.length; i++) {
if (args[i].startsWith("-")) {
printHelp("No option '" + args[i] + "' exist");
System.exit(1);
}
}
// Load application build information
buildInfo = new Properties();
try {
buildInfo.load(getClass().getResourceAsStream("build.properties"));
} catch (IOException ignore) {
buildInfo.setProperty("build.title", "Mibble");
}
// Open browser frame
try {
str = "com.apple.mrj.application.apple.menu.about.name";
System.setProperty(str, buildInfo.getProperty("build.title"));
str = UIManager.getSystemLookAndFeelClassName();
UIManager.setLookAndFeel(str);
} catch (Exception e) {
printInternalError(e);
}
frame = new BrowserFrame(this);
frame.setVisible(true);
// Load command-line & preference MIBs
frame.setBlocked(true);
list = getFilePrefs();
for (int i = 0; i < args.length; i++) {
list.add(args[i]);
}
for (int i = 0; i < list.size(); i++) {
frame.loadMib(list.get(i).toString());
}
if (list.size() <= 0) {
frame.loadMib("RFC1213-MIB");
frame.loadMib("HOST-RESOURCES-MIB");
}
frame.refreshTree();
frame.setBlocked(false);
}