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:popo.defcon.MsgMeCDC.java
/** * @param args the command line arguments *//*from w ww . j a va2 s . c o m*/ public static void main(String[] args) { MsgMeCDC m = new MsgMeCDC(); while (true) { m.Parse(); try { System.out.println("\n Starting Sleep"); Thread.sleep((long) 600000); System.out.println("\n SLEEP Finished"); } catch (InterruptedException ex) { System.out.println("\n SLEPP FAILED \n"); Logger.getLogger(MsgMeCDC.class.getName()).log(Level.SEVERE, null, ex); } } }
From source file:info.sugoiapps.xoclient.XOverClient.java
/** * @param args the command line arguments */// w w w . j a v a 2s . c o m public static void main(String[] args) { // System.getProperty("user.dir")); gets working directory in the form: C:\Users\Munyosz\etc...\ final String SEPARATOR = " - "; XOverClient client = new XOverClient(); String ladrs = getLocalAddress(); if (client.validAddress(ladrs)) { MACHINE_IP = ladrs; } else { JOptionPane.showMessageDialog(null, "Your machine's internal IP couldn't be retreived, program will exit."); System.exit(0); } REMOTE_IP = null; if (!new File(CONFIG_FILENAME).exists()) { while (REMOTE_IP == null || REMOTE_IP.equalsIgnoreCase("")) REMOTE_IP = JOptionPane .showInputDialog("Enter the internal IP of the machine you want to connect to.\n" + "Must be in the format 192.168.xxx.xxx"); String machinename = JOptionPane.showInputDialog("Now enter a name for the machine with internal IP " + "\"" + REMOTE_IP + "\"" + "\n" + "You will be able to select this machine from a list the next time you start the program."); new ListWriter(CONFIG_FILENAME).writeList(machinename + SEPARATOR + REMOTE_IP, APPEND); } else { MachineChooser mc = new MachineChooser(CONFIG_FILENAME, SEPARATOR, client); mc.setVisible(true); mc.setAddressInfo(MACHINE_IP); while (REMOTE_IP == null) { try { Thread.sleep(1000); } catch (InterruptedException ex) { JOptionPane.showMessageDialog(null, ex.getMessage()); Logger.getLogger(XOverClient.class.getName()).log(Level.SEVERE, null, ex); } } } new XOverClientGUI(REMOTE_IP, MACHINE_IP).setVisible(true); new FileServer().execute(); }
From source file:epsi.i5.frame.JFrame.java
/** * @param args the command line arguments */// w w w . jav a2 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 | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(JFrame.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 JFrame().setVisible(true); } }); }
From source file:di.uniba.it.tee2.shell.TEEShell.java
/** * language maindir encoding//from www. j a v a 2s .c o m * * @param args the command line arguments */ public static void main(String[] args) { try { CommandLine cmd = cmdParser.parse(options, args); if (cmd.hasOption("l") && cmd.hasOption("d")) { TEEShell shell = new TEEShell(cmd.getOptionValue("l"), cmd.getOptionValue("d"), cmd.getOptionValue("e", DEFAULT_CHARSET)); shell.promptLoop(); } else { HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp("Run TEE2 shell", options, true); } } catch (ParseException | IOException ex) { Logger.getLogger(TEEShell.class.getName()).log(Level.SEVERE, "General error", ex); } }
From source file:dlauncher.dialogs.Login.java
/** * @param args the command line arguments *//*from w ww . ja v 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 | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { @Override 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); } }); }
From source file:gr.forth.ics.isl.preprocessfilter2.controller.Controller.java
public static void main(String[] args) throws XPathExpressionException, ParserConfigurationException, SAXException, IOException, PreprocessFilterException, TransformerException, ParseException { PropertyReader prop = new PropertyReader(); //The following block of code is executed if there are arguments from the command line if (args.length > 0) { try {/*from w w w .j a va 2 s . c o m*/ Options options = new Options(); CommandLineParser PARSER = new PosixParser(); Option inputFile = new Option("inputFile", true, "input xml file"); Option outputFile = new Option("outputFile", true, "output xml file"); Option parentNode = new Option("parentNode", true, "output xml file"); Option newValuesFile = new Option("newValuesFile", true, "new values xml file"); Option newParentNode = new Option("newParentNode", true, "new parent node"); Option newValueTag = new Option("newValueTag", true, "new value tag"); Option oldValueTag = new Option("oldValueTag", true, "old value tag"); Option sameValueTag = new Option("sameValueTag", true, "same value tag"); Option createNewValues = new Option("createNewValues", true, "create new values option"); options.addOption(inputFile).addOption(outputFile).addOption(parentNode).addOption(newValuesFile) .addOption(newParentNode).addOption(newValueTag).addOption(oldValueTag) .addOption(sameValueTag).addOption(createNewValues); CommandLine cli = PARSER.parse(options, args); String inputFileArg = cli.getOptionValue("inputFile"); String outputFileArg = cli.getOptionValue("outputFile"); String parentNodeArg = cli.getOptionValue("parentNode"); String newValuesFileArg = cli.getOptionValue("newValuesFile"); String newParentNodeArg = cli.getOptionValue("newParentNode"); String newValueTagArg = cli.getOptionValue("newValueTag"); String oldValueTagArg = cli.getOptionValue("oldValueTag"); String sameValueTagArg = cli.getOptionValue("sameValueTag"); String createNewValuesArg = cli.getOptionValue("createNewValues"); PreprocessFilterUtilities process = new PreprocessFilterUtilities(); if (createNewValuesArg.equals("yes")) { if (process.createNewValuesFile(inputFileArg, newValuesFileArg, parentNodeArg)) { System.out.println("Succesfull PreProcessing!!!"); } } else { if (process.createOutputFile(inputFileArg, outputFileArg, parentNodeArg, newParentNodeArg, newValueTagArg, oldValueTagArg, sameValueTagArg, newValuesFileArg)) { System.out.println("Succesfull PreProcessing!!!"); } } } catch (PreprocessFilterException ex) { Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex); throw new PreprocessFilterException("PreProcess Filter Exception:", ex); } } //If there are no command line arguments then the .config file is being used. else { try { String inputFilePathProp = prop.getProperty(inputFilePath); String outputFilePathProp = prop.getProperty(outputFilePath); String parentNodeProp = prop.getProperty(parentNode); String newValuesFilePathProp = prop.getProperty(newValuesFilePath); String newParentNodeProp = prop.getProperty(newParentNode); String newValueTagProp = prop.getProperty(newValueTag); String oldValueTagProp = prop.getProperty(oldValueTag); String sameValueTagProp = prop.getProperty(sameValueTag); String createNewValuesFileProp = prop.getProperty(createNewValuesFile); PreprocessFilterUtilities process = new PreprocessFilterUtilities(); //The filter's code is executed with the .config file's resources as parameters if (createNewValuesFileProp.equals("yes")) { process.createNewValuesFile(inputFilePathProp, newValuesFilePathProp, parentNodeProp); } else { process.createOutputFile(inputFilePathProp, outputFilePathProp, parentNodeProp, newParentNodeProp, newValueTagProp, oldValueTagProp, sameValueTagProp, newValuesFilePathProp); } } catch (PreprocessFilterException ex) { Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex); throw new PreprocessFilterException("PreProcess Filter Exception:", ex); } } }
From source file:cz.muni.fi.mir.mathmlunificator.MathMLUnificatorCommandLineTool.java
/** * Main (starting) method of the command line application. * * @param argv Array of command line arguments that are expected to be * filesystem paths to input XML documents with MathML to be unified. * @throws ParserConfigurationException If a XML DOM builder cannot be * created with the configuration requested. *///from www .j av a2 s. c om public static void main(String argv[]) throws ParserConfigurationException { final Options options = new Options(); options.addOption("p", "operator-unification", false, "unify operator in addition to other types of nodes"); options.addOption("h", "help", false, "print help"); final CommandLineParser parser = new DefaultParser(); CommandLine line = null; try { line = parser.parse(options, argv); } catch (ParseException ex) { printHelp(options); System.exit(1); } if (line != null) { if (line.hasOption('h')) { printHelp(options); System.exit(0); } operatorUnification = line.hasOption('p'); final List<String> arguments = Arrays.asList(line.getArgs()); if (arguments.size() > 0) { Document outerDocument = DOMBuilder.getDocumentBuilder().newDocument(); Node rootNode = outerDocument.createElementNS(UNIFIED_MATHML_NS, UNIFIED_MATHML_NS_PREFIX + ":" + UNIFIED_MATHML_BATCH_OUTPUT_ROOT_ELEM); outerDocument.appendChild(rootNode); for (String filepath : arguments) { try { Document doc = DOMBuilder.buildDocFromFilepath(filepath); MathMLUnificator.unifyMathML(doc, operatorUnification); if (arguments.size() == 1) { xmlStdoutSerializer(doc); } else { Node itemNode = rootNode.getOwnerDocument().createElementNS(UNIFIED_MATHML_NS, UNIFIED_MATHML_NS_PREFIX + ":" + UNIFIED_MATHML_BATCH_OUTPUT_ITEM_ELEM); Attr filenameAttr = itemNode.getOwnerDocument().createAttributeNS(UNIFIED_MATHML_NS, UNIFIED_MATHML_NS_PREFIX + ":" + UNIFIED_MATHML_BATCH_OUTPUT_ITEM_FILEPATH_ATTR); filenameAttr.setTextContent(String.valueOf(filepath)); ((Element) itemNode).setAttributeNodeNS(filenameAttr); itemNode.appendChild( rootNode.getOwnerDocument().importNode(doc.getDocumentElement(), true)); rootNode.appendChild(itemNode); } } catch (SAXException | IOException ex) { Logger.getLogger(MathMLUnificatorCommandLineTool.class.getName()).log(Level.SEVERE, "Failed processing of file: " + filepath, ex); } } if (rootNode.getChildNodes().getLength() > 0) { xmlStdoutSerializer(rootNode.getOwnerDocument()); } } else { printHelp(options); System.exit(0); } } }
From source file:de.stefanwndelmann.zy1270logger.Test.TestJFreeChart.java
/** * @param args the command line arguments *///w ww . 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 ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(TestJFreeChart.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(TestJFreeChart.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(TestJFreeChart.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(TestJFreeChart.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 TestJFreeChart().setVisible(true); } }); }
From source file:TestReadCustData.java
public static void main(String[] args) { AgentLoader.loadAgentFromClasspath("avaje-ebeanorm-agent", "debug=1"); List<Customer> lCust = new ArrayList<>(); try {/*w w w. jav a 2 s . c o m*/ List<String> s = Files.readAllLines(Paths.get("customer.txt"), Charsets.ISO_8859_1); for (String s1 : s) { if (!s1.startsWith("GRUP")) { Customer c = new Customer(); try { c.setId(Long.parseLong(s1.split("~")[3])); } catch (ArrayIndexOutOfBoundsException arrex) { c.setId(Long.parseLong(s1.split("~")[3])); } try { c.setNama(s1.split("~")[4]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setNama(""); } try { c.setShipto(s1.split("~")[9]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setShipto(""); } try { c.setKota(s1.split("~")[12]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setKota(""); } try { c.setProvinsi(s1.split("~")[13]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setProvinsi(""); } try { c.setKodePos(s1.split("~")[14]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setKodePos(""); } try { c.setNamaArea(s1.split("~")[2]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setNamaArea(""); } try { c.setDKLK(s1.split("~")[15]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setDKLK(""); } try { c.setCreditLimit(Long.parseLong(s1.split("~")[16])); } catch (ArrayIndexOutOfBoundsException arrex) { c.setCreditLimit(new Long(0)); } try { c.setNpwp(s1.split("~")[11]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setNpwp(""); } try { c.setNamaWajibPajak(s1.split("~")[10]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setNamaWajibPajak(""); } try { c.setCreationDate(s1.split("~")[6]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setCreationDate(""); } try { c.setLastUpdateBy(s1.split("~")[17]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setLastUpdateBy(""); } try { c.setLastUpdateDate(s1.split("~")[18]); } catch (ArrayIndexOutOfBoundsException arrex) { c.setLastUpdateDate(""); } lCust.add(c); } } for (Customer c : lCust) { Customer cc = Ebean.find(Customer.class, c.getId()); if (cc != null) { cc = c; Ebean.update(cc); } System.out.print(c.getId()); System.out.print(" | "); System.out.print(c.getNama()); System.out.print(" | "); System.out.print(c.getShipto()); System.out.print(" | "); System.out.print(c.getNpwp()); System.out.print(" | "); System.out.print(c.getNamaWajibPajak()); System.out.println(); } } catch (IOException ex) { Logger.getLogger(TestReadCustData.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:cross.io.PropertyFileGenerator.java
/** * * @param args/*from w w w . jav a2 s . c om*/ */ public static void main(String[] args) { Options options = new Options(); options.addOption("f", true, "base directory for output of files"); Option provOptions = new Option("p", true, "Comma separated list of provider classes to create Properties for"); provOptions.setRequired(true); provOptions.setValueSeparator(','); options.addOption(provOptions); CommandLineParser parser = new PosixParser(); HelpFormatter hf = new HelpFormatter(); try { File basedir = null; List<String> providers = Collections.emptyList(); CommandLine cmd = parser.parse(options, args); if (cmd.hasOption("f")) { basedir = new File(cmd.getOptionValue("f")); } else { hf.printHelp("java -cp maltcms.jar " + PropertyFileGenerator.class, options); } if (cmd.hasOption("p")) { String[] str = cmd.getOptionValues("p"); providers = Arrays.asList(str); } else { hf.printHelp("java -cp maltcms.jar " + PropertyFileGenerator.class, options); } for (String provider : providers) { createProperties(provider, basedir); } } catch (ParseException ex) { Logger.getLogger(PropertyFileGenerator.class.getName()).log(Level.SEVERE, null, ex); } }