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:io.albraga.namus.OverlaypdfUI.java
/** * @param args the command line arguments *//*from ww w . j a va 2 s .co 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(OverlaypdfUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(OverlaypdfUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(OverlaypdfUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(OverlaypdfUI.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 OverlaypdfUI().setVisible(true); } }); }
From source file:net.sf.mpaxs.spi.computeHost.StartUp.java
/** * * @param args/*from w ww. ja v a2 s .c o m*/ */ public static void main(String args[]) { FileHandler handler; try { handler = new FileHandler("computeHost.log"); Logger logger = Logger.getLogger(StartUp.class.getName()); logger.addHandler(handler); } catch (IOException ex) { Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex); } catch (SecurityException ex) { Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex); } Options options = new Options(); Option[] optionArray = new Option[] { OptionBuilder.withArgName("configuration").hasArg().isRequired() .withDescription("URL to configuration file for compute host").create("c") }; for (Option opt : optionArray) { options.addOption(opt); } if (args.length == 0) { HelpFormatter hf = new HelpFormatter(); hf.printHelp(StartUp.class.getCanonicalName(), options, true); System.exit(1); } GnuParser gp = new GnuParser(); try { CommandLine cl = gp.parse(options, args); try { URL configURL = new URL(cl.getOptionValue("c")); PropertiesConfiguration cfg = new PropertiesConfiguration(configURL); StartUp su = new StartUp(cfg); } catch (ConfigurationException ex) { Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex); } catch (MalformedURLException ex) { Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex); } } catch (ParseException ex) { Logger.getLogger(StartUp.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:eu.edisonproject.classification.main.BatchMain.java
public static void main(String[] args) throws Exception { try {//ww w . ja v a 2 s . com // args = new String[1]; // args[0] = ".."; // TestDataFlow.execute(args); // System.exit(0); // TestTFIDF.execute(args); Options options = new Options(); Option operation = new Option("op", "operation", true, "type of operation to perform. " + "To convert txt to avro 'a'.\n" + "For running clasification on avro documents 'c'"); operation.setRequired(true); options.addOption(operation); Option input = new Option("i", "input", true, "input path"); input.setRequired(false); options.addOption(input); Option output = new Option("o", "output", true, "output file"); output.setRequired(false); options.addOption(output); Option competencesVector = new Option("c", "competences-vector", true, "competences vectors"); competencesVector.setRequired(false); options.addOption(competencesVector); Option v1 = new Option("v1", "vector1", true, ""); v1.setRequired(false); options.addOption(v1); Option v2 = new Option("v2", "vector2", true, ""); v2.setRequired(false); options.addOption(v2); Option popertiesFile = new Option("p", "properties", true, "path for a properties file"); popertiesFile.setRequired(false); options.addOption(popertiesFile); CommandLineParser parser = new BasicParser(); CommandLine cmd = parser.parse(options, args); String propPath = cmd.getOptionValue("properties"); MyProperties prop; if (propPath == null) { prop = ConfigHelper .getProperties(".." + File.separator + "etc" + File.separator + "configure.properties"); } else { prop = ConfigHelper.getProperties(propPath); } switch (cmd.getOptionValue("operation")) { case "a": text2Avro(cmd.getOptionValue("input"), cmd.getOptionValue("output"), prop); break; case "c": calculateTFIDF(cmd.getOptionValue("input"), cmd.getOptionValue("output"), cmd.getOptionValue("competences-vector"), prop); break; case "p": // -op p -v2 $HOME/Downloads/msc.csv -v1 $HOME/Downloads/job.csv -p $HOME/workspace/E-CO-2/etc/classification.properties profile(cmd.getOptionValue("v1"), cmd.getOptionValue("v2"), cmd.getOptionValue("output")); break; } } catch (IllegalArgumentException | ParseException | IOException ex) { Logger.getLogger(BatchMain.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:menusearch.ui.MenuGraph.java
/** * @param args the command line arguments */// w w w .ja v a2 s . co 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(MenuGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(MenuGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(MenuGraph.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(MenuGraph.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 MenuGraph().setVisible(true); } }); }
From source file:Logi.GSeries.Service.LogiGSKService.java
/** * @param args the command line arguments *///w w w . j ava2 s. com public static void main(String[] args) { SystemTray.DEBUG = false; Settings settings; if (IOOperations.currentSettingsExist()) { settings = IOOperations.loadCurrentSettingsObjectFromFile(); } else { settings = new Settings(); } LogiGSKService l = new LogiGSKService(); if (settings.getShowSystemTray()) { l.showSystemTray(); } else { l.hideSystemTray(); } l.begin(); try { String dataFolderPath = IOOperations.getLocalDataDirectoryPath(); File dataFolder = new File(dataFolderPath); if (!dataFolder.exists()) { dataFolder.mkdir(); } String logFolderPath = IOOperations.getLogDirectoryPath(); File logFolder = new File(logFolderPath); if (!logFolder.exists()) { logFolder.mkdir(); } FileHandler fileHandler = new FileHandler(logFolderPath + "LogiGSK.log", FILE_SIZE, 3); fileHandler.setLevel(Level.ALL); logger.setLevel(Level.ALL); logger.addHandler(fileHandler); } catch (IOException | SecurityException ex) { Logger.getLogger(LogiGSKService.class.getName()).log(Level.SEVERE, null, ex); } int clientNumber = 0; ServerSocket listener = null; PropertyConfigurator.configure(LogiGSKService.class.getResource("/Logi/GSeries/Service/log4j.properties")); reloading = true; boolean firstTime = true; while (reloading) { listener = null; if (reloading && !firstTime) { if (IOOperations.currentSettingsExist()) { settings = IOOperations.loadCurrentSettingsObjectFromFile(); } else { settings = new Settings(); } } firstTime = false; reloading = false; running = true; try { listener = new ServerSocket(settings.getPort(), 0, InetAddress.getByName(null)); while (running) { new Manager(listener.accept(), clientNumber++, logger).start(); } } catch (IOException ex) { Logger.getLogger(LogiGSKService.class.getName()).log(Level.SEVERE, null, ex); } finally { if (listener != null) { try { listener.close(); } catch (IOException ex) { Logger.getLogger(LogiGSKService.class.getName()).log(Level.SEVERE, null, ex); } } } } }
From source file:testingproject.TestingProjectDLB.java
public static void main(String[] args) { try {/*w ww . j a va 2s. co m*/ // List<String> dataList =getDLBResults("j","16/11/17"); // jayoda // List<String> dataList =getDLBResults("sf","16/11/19"); // shanida List<String> dataList = getDLBResults("jj", "16/12/04"); // Galaxy Star // List<String> dataList =getDLBResults("nj","16/11/18"); // Niyath Jaya // List<String> dataList =getDLBResults("df","16/11/4"); // Lagna Vasana ? lagne enne naa // List<String> dataList =getDLBResults("sb","16/12/10"); // super ball // List<String> dataList =getDLBResults("l","16/11/14"); // sanwardana lakshapathi // List<String> dataList =getDLBResults("ks","16/11/18"); // Kotipathi Shanida for (String data : dataList) { System.out.println(data); } } catch (IOException ex) { Logger.getLogger(TestingProjectDLB.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:dependencies.DependencyResolving.java
/** * @param args the command line arguments *//* ww w .j a v a2 s .c o m*/ public static void main(String[] args) { // TODO code application logic here JSONParser parser = new JSONParser(); //we use JSONParser in order to be able to read from JSON file try { //here we declare the file reader and define the path to the file dependencies.json Object obj = parser.parse(new FileReader( "C:\\Users\\Vladimir\\Documents\\NetBeansProjects\\DependenciesResolving\\src\\dependencies\\dependencies.json")); JSONObject project = (JSONObject) obj; //a JSON object containing all the data in the .json file JSONArray dependencies = (JSONArray) project.get("dependencies"); //get array of objects with key "dependencies" System.out.print("We need to install the following dependencies: "); Iterator<String> iterator = dependencies.iterator(); //define an iterator over the array "dependencies" while (iterator.hasNext()) { System.out.println(iterator.next()); } //on the next line we declare another object, which parses a Parser object and reads from all_packages.json Object obj2 = parser.parse(new FileReader( "C:\\Users\\Vladimir\\Documents\\NetBeansProjects\\DependenciesResolving\\src\\dependencies\\all_packages.json")); JSONObject tools = (JSONObject) obj2; //a JSON object containing all thr data in the file all_packages.json for (int i = 0; i < dependencies.size(); i++) { if (tools.containsKey(dependencies.get(i))) { System.out.println( "In order to install " + dependencies.get(i) + ", we need the following programs:"); JSONArray temporaryArray = (JSONArray) tools.get(dependencies.get(i)); //a temporary JSON array in which we store the keys and values of the dependencies for (i = 0; i < temporaryArray.size(); i++) { System.out.println(temporaryArray.get(i)); } ArrayList<Object> arraysOfJsonData = new ArrayList<Object>(); //an array in which we will store the keys of the objects, after we use the values and won't need them anymore for (i = 0; i < temporaryArray.size(); i++) { System.out.println("Installing " + temporaryArray.get(i)); } while (!temporaryArray.isEmpty()) { for (Object element : temporaryArray) { if (tools.containsKey(element)) { JSONArray secondaryArray = (JSONArray) tools.get(element); //a temporary array within the scope of the if-statement if (secondaryArray.size() != 0) { System.out.println("In order to install " + element + ", we need "); } for (i = 0; i < secondaryArray.size(); i++) { System.out.println(secondaryArray.get(i)); } for (Object o : secondaryArray) { arraysOfJsonData.add(o); //here we create a file with the installed dependency File file = new File( "C:\\Users\\Vladimir\\Documents\\NetBeansProjects\\DependenciesResolving\\src\\dependencies\\installed_modules\\" + o); if (file.createNewFile()) { System.out.println(file.getName() + " is installed!"); } else { } } secondaryArray.clear(); } } temporaryArray.clear(); for (i = 0; i < arraysOfJsonData.size(); i++) { temporaryArray.add(arraysOfJsonData.get(i)); } arraysOfJsonData.clear(); } } } Set<String> keys = tools.keySet(); // here we define a set of keys of the objects in all_packages.json for (String s : keys) { File file = new File( "C:\\Users\\Vladimir\\Documents\\NetBeansProjects\\DependenciesResolving\\src\\dependencies\\installed_modules\\" + s); if (file.createNewFile()) { System.out.println(file.getName() + " is installed."); } else { } } } catch (IOException ex) { Logger.getLogger(DependencyResolving.class.getName()).log(Level.SEVERE, null, ex); } catch (ParseException ex) { Logger.getLogger(DependencyResolving.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:cmsc105_mp2.Plot.java
/** * @param args the command line arguments *///from ww w. j ava 2s .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(Plot.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Plot.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Plot.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Plot.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 Plot().setVisible(true); } }); }
From source file:de.bamamoto.mactools.png2icns.Scaler.java
public static void main(String[] args) { Options options = new Options(); options.addOption("i", "input-filename", true, "Filename ofthe image containing the icon. The image should be a square with at least 1024x124 pixel in PNG format."); options.addOption("o", "iconset-foldername", true, "Name of the folder where the iconset will be stored. The extension .iconset will be added automatically."); String folderName;/*from w w w.jav a 2 s .c o m*/ CommandLineParser parser = new DefaultParser(); CommandLine cmd = null; try { cmd = parser.parse(options, args); if (cmd.hasOption("i")) { if (new File(cmd.getOptionValue("i")).isFile()) { if (cmd.hasOption("o")) { folderName = cmd.getOptionValue("o"); } else { folderName = "/tmp/noname.iconset"; } if (!folderName.endsWith(".iconset")) { folderName = folderName + ".iconset"; } new File(folderName).mkdirs(); BufferedImage source = ImageIO.read(new File(cmd.getOptionValue("i"))); BufferedImage resized = resize(source, 1024, 1024); save(resized, folderName + "/icon_512x512@2x.png"); resized = resize(source, 512, 512); save(resized, folderName + "/icon_512x512.png"); save(resized, folderName + "/icon_256x256@2x.png"); resized = resize(source, 256, 256); save(resized, folderName + "/icon_256x256.png"); save(resized, folderName + "/icon_128x128@2x.png"); resized = resize(source, 128, 128); save(resized, folderName + "/icon_128x128.png"); resized = resize(source, 64, 64); save(resized, folderName + "/icon_32x32@2x.png"); resized = resize(source, 32, 32); save(resized, folderName + "/icon_32x32.png"); save(resized, folderName + "/icon_16x16@2x.png"); resized = resize(source, 16, 16); save(resized, folderName + "/icon_16x16.png"); Scaler.runProcess(new String[] { "/usr/bin/iconutil", "-c", "icns", folderName }); } } } catch (IOException e) { System.out.println("Error reading image: " + cmd.getOptionValue("i")); e.printStackTrace(); } catch (ParseException ex) { Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.mmone.gpdati.allotment.record.AllotmentRecordsListBuilder.java
public static void main(String[] args) { AllotmentLineProvvider afr = new AllotmentFileReader( "D:/tmp_desktop/scrigno-gpdati/FILE_DISPO__20160802.txt"); AllotmentRecordsListBuilder arlb = new AllotmentRecordsListBuilder(afr); try {/*from w w w . ja va 2 s .c om*/ List<AllotmentRecord> records = arlb.getGroupedRecords(); System.out.println("Records in list " + records.size()); if (true) for (AllotmentRecord record : records) { System.out.println("---- " + record.getCompleteKey()); } //MapUtils.debugPrint(System.out , "MAP", arlb.getMappedRecords()); //MapUtils.debugPrint(System.out , "MAP", reg); } catch (Exception ex) { SoapUI.log.info(ex.getMessage()); Logger.getLogger(AllotmentRecordsListBuilder.class.getName()).log(Level.SEVERE, null, ex); } }