List of usage examples for java.util.logging Level SEVERE
Level SEVERE
To view the source code for java.util.logging Level SEVERE.
Click Source Link
From source file:heimerdinger.HeimerdingerFrame.java
/** * @param args the command line arguments *//*from w w w . j a va2 s.c o m*/ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Windows".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(HeimerdingerFrame.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(HeimerdingerFrame.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(HeimerdingerFrame.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(HeimerdingerFrame.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new HeimerdingerFrame().setVisible(true); } }); }
From source file:com.bluemarsh.jswat.console.Main.java
/** * Kicks off the application.//from w w w . java 2 s.c o m * * @param args the command line arguments. */ public static void main(String[] args) { // // An attempt was made early on to use the Console class in java.io, // but that is not designed to handle asynchronous output from // multiple threads, so we just use the usual System.out for output // and System.in for input. Note that automatic flushing is used to // ensure output is shown in a timely fashion. // // // Where console mode seems to work: // - bash // - emacs // // Where console mode does not seem to work: // - NetBeans: output from event listeners is never shown and the // cursor sometimes lags behind the output // // Turn on flushing so printing the prompt will flush // all buffered output generated from other threads. PrintWriter output = new PrintWriter(System.out, true); // Make sure we have the JPDA classes. try { Bootstrap.virtualMachineManager(); } catch (NoClassDefFoundError ncdfe) { output.println(NbBundle.getMessage(Main.class, "MSG_Main_NoJPDA")); System.exit(1); } // Ensure we can create the user directory by requesting the // platform service. Simply asking for it has the desired effect. PlatformProvider.getPlatformService(); // Define the logging configuration. LogManager manager = LogManager.getLogManager(); InputStream is = Main.class.getResourceAsStream("logging.properties"); try { manager.readConfiguration(is); } catch (IOException ioe) { ioe.printStackTrace(); System.exit(1); } // Print out some useful debugging information. logSystemDetails(); // Add a shutdown hook to make sure we exit cleanly. Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { // Save the command aliases. CommandParser parser = CommandProvider.getCommandParser(); parser.saveSettings(); // Save the runtimes to persistent storage. RuntimeManager rm = RuntimeProvider.getRuntimeManager(); rm.saveRuntimes(); // Save the sessions to persistent storage and have them // close down in preparation to exit. SessionManager sm = SessionProvider.getSessionManager(); sm.saveSessions(true); } })); // Initialize the command parser and load the aliases. CommandParser parser = CommandProvider.getCommandParser(); parser.loadSettings(); parser.setOutput(output); // Create an OutputAdapter to display debuggee output. OutputAdapter adapter = new OutputAdapter(output); SessionManager sessionMgr = SessionProvider.getSessionManager(); sessionMgr.addSessionManagerListener(adapter); // Create a SessionWatcher to monitor the session status. SessionWatcher swatcher = new SessionWatcher(); sessionMgr.addSessionManagerListener(swatcher); // Create a BreakpointWatcher to monitor the breakpoints. BreakpointWatcher bwatcher = new BreakpointWatcher(); sessionMgr.addSessionManagerListener(bwatcher); // Add the watchers and adapters to the open sessions. Iterator<Session> iter = sessionMgr.iterateSessions(); while (iter.hasNext()) { Session s = iter.next(); s.addSessionListener(adapter); s.addSessionListener(swatcher); } // Find and run the RC file. try { runStartupFile(parser, output); } catch (IOException ioe) { logger.log(Level.SEVERE, null, ioe); } // Process command line arguments. try { processArguments(args); } catch (ParseException pe) { // Report the problem and keep going. System.err.println("Option parsing failed: " + pe.getMessage()); logger.log(Level.SEVERE, null, pe); } // Display a helpful greeting. output.println(NbBundle.getMessage(Main.class, "MSG_Main_Welcome")); if (jdbEmulationMode) { output.println(NbBundle.getMessage(Main.class, "MSG_Main_Jdb_Emulation")); } // Enter the main loop of processing user input. BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); while (true) { // Keep the prompt format identical to jdb for compatibility // with emacs and other possible wrappers. output.print("> "); output.flush(); try { String command = input.readLine(); // A null value indicates end of stream. if (command != null) { performCommand(output, parser, command); } // Sleep briefly to give the event processing threads, // and the automatic output flushing, a chance to catch // up before printing the input prompt again. Thread.sleep(250); } catch (InterruptedException ie) { logger.log(Level.WARNING, null, ie); } catch (IOException ioe) { logger.log(Level.SEVERE, null, ioe); output.println(NbBundle.getMessage(Main.class, "ERR_Main_IOError", ioe)); } catch (Exception x) { // Don't ever let an internal bug (e.g. in the command parser) // hork the console, as it really irritates people. logger.log(Level.SEVERE, null, x); output.println(NbBundle.getMessage(Main.class, "ERR_Main_Exception", x)); } } }
From source file:de.uni_koblenz.jgralab.utilities.greqlinterface.GReQLConsole.java
/** * Performs some queries, extend this method to perform more queries * /*from w w w .j a va 2 s .co m*/ * @param args */ public static void main(String[] args) { CommandLine comLine = processCommandLineOptions(args); assert comLine != null; String queryFile = comLine.getOptionValue("q"); String graphFile = comLine.getOptionValue("g"); boolean loadSchema = comLine.hasOption("s"); JGraLab.setLogLevel(Level.SEVERE); GReQLConsole console = new GReQLConsole(graphFile, loadSchema, comLine.hasOption('v')); Object result = console.performQuery(new File(queryFile)); if (comLine.hasOption("o")) { try { console.resultToHTML(result, comLine.getOptionValue("o")); } catch (IOException e) { System.err.println("Exception while creating HTML output:"); e.printStackTrace(); } } else { System.out.println("Result: " + result); } }
From source file:sms.Reports.java
/** * @param args the command line arguments *//*from w ww . j av a 2 s . com*/ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Reports.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Reports.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Reports.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Reports.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Reports().setVisible(true); } }); }
From source file:com.quangphuong.crawler.util.HighlightsOfflineCrawler.java
public static void main(String[] args) { webClient.getOptions().setJavaScriptEnabled(false); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); // webClient.setJavaScriptTimeout(2 * 1000); int y = startY; int m = startM; int d = startD; int date = 0; File f = new File(cachePath); if (f.exists() && !f.isDirectory()) { date = (Integer) ObjectIO.read(cachePath); y = date / 10000;//from ww w. j a v a2 s.c o m m = date % 10000; d = m % 100; System.out.println("D: " + d + "-M: " + m + "-Y: " + y); } boolean goNext = true; while (date != stopDate) { date = y + m + d; // Crawler String dateStr = String.valueOf(date); String link = AppConstant.videoPrefix + dateStr; try { System.out.println("Link: " + link); HtmlPage page = webClient.getPage(link); goNext = page.getWebResponse().getStatusCode() != 503; List<HtmlElement> tables = (List<HtmlElement>) page.getByXPath(AppConstant.hightlightTables); int count = 0; String kind = ""; String tournament = ""; for (HtmlElement table : tables) { count++; //Get kind HtmlElement span = table.getFirstByXPath(AppConstant.highlightKind); if (span != null && span.getAttribute("class").equals("whitetitle")) { kind = span.getTextContent(); System.out.println(kind); } // Get Tournament if (table.getAttribute("background") != null && !"".equals(table.getAttribute("background"))) { HtmlElement el = table.getFirstByXPath(AppConstant.highlightTournament); tournament = el.getTextContent(); System.out.println(tournament); } else // Get matches { if (count != 1 && (table.getAttribute("bgcolor").equals(""))) { List<HtmlElement> matches = (List<HtmlElement>) table .getByXPath(AppConstant.highlightMatches); for (HtmlElement el : matches) { // System.out.println(el.asXml()); HtmlElement tmp = el.getFirstByXPath(AppConstant.highlightMatch); String match = tmp.getTextContent().trim(); tmp = el.getFirstByXPath(AppConstant.highlightMatchTime); String time = tmp.getTextContent().trim(); tmp = el.getFirstByXPath(AppConstant.highlightMatchLogoTeam1); String logoTeam1; try { logoTeam1 = tmp.getAttribute("src"); } catch (Exception e) { logoTeam1 = ""; } tmp = el.getFirstByXPath(AppConstant.highlightMatchScore); String score = tmp.getTextContent().trim(); tmp = el.getFirstByXPath(AppConstant.highlightMatchLogoTeam2); String logoTeam2; try { logoTeam2 = tmp.getAttribute("src"); } catch (Exception e) { logoTeam2 = ""; } // webClient.waitForBackgroundJavaScript(10 * 1000); tmp = el.getFirstByXPath(AppConstant.highlightMatchLink); String highlightLink; try { highlightLink = tmp.getAttribute("href"); } catch (Exception e) { highlightLink = ""; } tmp = el.getFirstByXPath(AppConstant.highlightMatchFullLink); String fullMatchLink; try { fullMatchLink = tmp.getAttribute("href"); } catch (Exception e) { fullMatchLink = ""; } tmp = el.getFirstByXPath(AppConstant.highlightMatchLongLink); String longHighlightLink; try { longHighlightLink = tmp.getAttribute("href"); } catch (Exception e) { longHighlightLink = ""; } System.out.println("----" + match + "-" + time + "-" + logoTeam1 + "-" + score + "-" + logoTeam2 + "-" + highlightLink + "-" + fullMatchLink + "-" + longHighlightLink); // System.out.println("kindddddddddddddddd: " + kind); Highlight highlight = new Highlight(0, kind, tournament, match, logoTeam1, logoTeam2, highlightLink, longHighlightLink, fullMatchLink, score, dateStr, time); DBWrapper dBWrapper = new DBWrapper(false); dBWrapper.updateEntity(highlight); } } } } // System.out.println("-------------------"); // System.out.println("Page memory: " + Agent.sizeOf(page)); } catch (Exception ex) { Logger.getLogger(HighlightsOfflineCrawler.class.getName()).log(Level.SEVERE, null, ex); } ObjectIO.write(cachePath, date); if (goNext) { if (m == 1200 && isLastDayOfMonth(d, m, y)) { y += 10000; m = 100; d = 1; } else if (isLastDayOfMonth(d, m, y)) { m += 100; d = 1; } else { d += 1; } } } }
From source file:com.game.ui.views.PlayerEditor.java
public static void main(String[] args) { try {/*from w ww .ja v a 2 s . c o m*/ GameBean.doInit(); if (GameBean.weaponDetails.size() > 0) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.add(new PlayerEditor()); frame.setName("Frame"); frame.pack(); frame.setVisible(true); } } catch (Exception ex) { Logger.getLogger(PlayerEditor.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:interfaceTisseoWS.ST4.java
/** * @param args the command line arguments *//*from www . j a va 2 s.c om*/ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ST4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ST4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ST4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ST4.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { try { new ST4().setVisible(true); } catch (ParseException ex) { Logger.getLogger(ST4.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(ST4.class.getName()).log(Level.SEVERE, null, ex); } catch (URISyntaxException ex) { Logger.getLogger(ST4.class.getName()).log(Level.SEVERE, null, ex); } } }); }
From source file:Balo.Main.java
/** * @param args the command line arguments *///from ww w . ja va 2 s .c o m public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Main().setVisible(true); } }); }
From source file:ftp.search.Index.java
/** * @param args the command line arguments *///w w w .j av a2s .c o m public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Index.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Index().setVisible(true); } }); }
From source file:config.Login.java
/** * @param args the command line arguments *///from w ww . j ava 2 s.com public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Login dialog = new Login(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }