List of usage examples for java.lang System exit
public static void exit(int status)
From source file:UIManagerDefaults.java
public static void main(String[] args) { System.out.println("Default L&F:"); System.out.println(" " + UIManager.getLookAndFeel().getName()); UIManager.LookAndFeelInfo[] inst = UIManager.getInstalledLookAndFeels(); System.out.println("Installed L&Fs: "); for (int i = 0; i < inst.length; i++) { System.out.println(" " + inst[i].getName()); }// www. j a v a 2 s . c o m LookAndFeel[] aux = UIManager.getAuxiliaryLookAndFeels(); System.out.println("Auxiliary L&Fs: "); if (aux != null) { for (int i = 0; i < aux.length; i++) { System.out.println(" " + aux[i].getName()); } } else { System.out.println(" <NONE>"); } System.out.println("Cross-Platform:"); System.out.println(UIManager.getCrossPlatformLookAndFeelClassName()); System.out.println("System:"); System.out.println(UIManager.getSystemLookAndFeelClassName()); System.exit(0); }
From source file:AttributesApp.java
public static void main(String arg[]) { JFrame frame = new JFrame(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }//from www. j a v a 2 s.c om }); frame.getContentPane().add("Center", new AttributesApp()); frame.setSize(500, 200); frame.setVisible(true); }
From source file:TexturePaintDemo.java
public static void main(String s[]) { JFrame f = new JFrame(); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }/*from ww w . j av a 2 s .c om*/ }); TexturePaintDemo p = new TexturePaintDemo(); f.getContentPane().add("Center", p); p.init(); f.pack(); f.setSize(new Dimension(250, 250)); f.show(); }
From source file:Main.java
static public void main(String[] arg) { boolean validate = true; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(validate);//from w w w . j a va 2 s .c o m dbf.setNamespaceAware(true); dbf.setIgnoringElementContentWhitespace(true); // Parse the input to produce a parse tree with its root // in the form of a Document object Document doc = null; try { DocumentBuilder builder = dbf.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(getXMLData())); doc = builder.parse(is); } catch (SAXException e) { System.exit(1); } catch (ParserConfigurationException e) { System.err.println(e); System.exit(1); } catch (IOException e) { System.err.println(e); System.exit(1); } dump(doc); }
From source file:TransformDemo.java
public static void main(String s[]) { JFrame f = new JFrame(); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }/*from w w w . ja v a2 s.c o m*/ }); TransformDemo p = new TransformDemo(); f.getContentPane().add("Center", p); p.init(); f.pack(); f.setSize(new Dimension(300, 300)); f.show(); }
From source file:ColoredToolTipExample.java
public static void main(String args[]) { try {// w w w . ja v a2 s. co m UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } catch (Exception evt) { } ColoredToolTipExample f = new ColoredToolTipExample(); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); f.setSize(300, 100); f.show(); }
From source file:com.kijes.ela.cli.ElaClientApplication.java
public static void main(String[] args) throws Exception { System.exit(new ElaClientApplication().run(args)); /*/*from ww w . j a v a 2 s . c o m*/ ElaClientApplication app = new ElaClientApplication(); app.service.connect("http://localhost:8080/"); Collection<ElaUser> elaUsers = app.service.getUsers(); printUsers(elaUsers); app.service.createUser("111", "AAA"); app.service.createUser("222", "BBB"); elaUsers = app.service.getUsers(); printUsers(elaUsers); app.service.userEnter("AAA"); ElaUser elaUser = app.service.getUser("111"); printUser(elaUser); app.service.userLeave("AAA"); elaUser = app.service.getUser("111"); printUser(elaUser); app.service.deleteUser("111"); elaUsers = app.service.getUsers(); printUsers(elaUsers); */ }
From source file:AreaSubtract.java
public static void main(String s[]) { JFrame f = new JFrame("Pear"); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }// ww w. ja v a2 s. com }); JApplet applet = new AreaSubtract(); f.getContentPane().add("Center", applet); applet.init(); f.pack(); f.setSize(new Dimension(150, 200)); f.show(); }
From source file:com.threerings.getdown.tools.Digester.java
/** * A command line entry point for the digester. *//*ww w . j av a 2s . c o m*/ public static void main(String[] args) throws IOException, GeneralSecurityException { if (args.length != 1 && args.length != 4) { System.err.println("Usage: Digester app_dir [keystore_path password alias]"); System.exit(255); } createDigest(new File(args[0])); if (args.length == 4) { signDigest(new File(args[0]), new File(args[1]), args[2], args[3]); } }
From source file:guru.nidi.raml.doc.Main.java
public static void main(String[] args) { System.out.println("RAML doc. Version " + Version.VERSION); try {//from www .java 2 s. c om final GeneratorConfig config = new OptionParser().parse(args); config.generate(); System.out.println("Generated Documentation in '" + config.getTarget() + "'"); } catch (ParseException e) { System.err.println(e.getMessage()); new OptionParser().showHelp(); System.exit(1); } catch (Exception e) { System.err.println("Problem generating RAML documentation."); e.printStackTrace(); System.exit(1); } }