use of de.neemann.digital.gui.remote.RemoteSever in project Digital by hneemann.
the class Main method main.
// **********************
// remote interface end
// **********************
/**
* Starts the main app
*
* @param args the arguments
*/
public static void main(String[] args) {
Thread.setDefaultUncaughtExceptionHandler(new DigitalUncaughtExceptionHandler());
try {
// enforce MetalLookAndFeel
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
} catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException | IllegalAccessException e) {
e.printStackTrace();
}
ToolTipManager.sharedInstance().setDismissDelay(10000);
URL.setURLStreamHandlerFactory(ElementHelpDialog.createURLStreamHandlerFactory());
FormatToExpression.setDefaultFormat(Settings.getInstance().get(Keys.SETTINGS_EXPRESSION_FORMAT));
MainBuilder builder = new MainBuilder();
for (String s : args) {
if (s.equals("experimental"))
experimental = true;
else
builder.setFileToOpen(new File(s));
}
SwingUtilities.invokeLater(() -> {
Main main = builder.build();
try {
new RemoteSever(new DigitalHandler(main)).start(41114);
} catch (IOException e) {
SwingUtilities.invokeLater(() -> main.statusLabel.setText(Lang.get("err_portIsInUse")));
}
main.setVisible(true);
CheckForNewRelease.showReleaseDialog(main);
});
}
Aggregations