title: Why is my NumberFormatException not being caught in my try-catch?
body: <p>So I am trying to <code>catch (NumberFormatException ex)</code> in my code:</p>
  
  <pre><code>private void Processes() throws IOException, InterruptedException {
      // New Thread "processesThread" will start here.
      final Object mon = threadBlock;
      Thread processesThread = new Thread(new Runnable() {
          @Override
          public void run() {
              synchronized (mon) {
                  try {
                      try {
                          try {
                              Runtime rt = Runtime.getRuntime();
                              // "runnableTogether" will be the number that the user inputs in the GUI.
                              switch (runnableTogether) {
                                  case 4:
                                  processes.add(rt.exec("C:/Windows/System32/SoundRecorder.exe"));
                                  case 3:
                                  processes.add(rt.exec("C:/Windows/System32/taskmgr.exe"));
                                  case 2:
                                  processes.add(rt.exec("C:/Windows/System32/notepad.exe"));
                                  case 1:
                                  processes.add(rt.exec("C:/Windows/System32/calc.exe"));
                                  Thread.sleep(5000);
                                  destroyProcesses(processes);
                                  break;
                                  default:
                                  invalidInput();
                                  break;
                              }
                              mon.wait();
                              } catch (IOException ex) {
                          }
                          } catch (InterruptedException ex) {
                      }
                      } catch (NumberFormatException ex) {
                      nullInput();
                  }
              }
          }
      });
  </code></pre>
  
  <p>But it gives me this error:</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ""
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Integer.parseInt(Integer.java:504)
          at java.lang.Integer.parseInt(Integer.java:527)
          at tf2_account_chief.TF2_Account_Chief.actionPerformed(TF2_Account_Chief.java:425)
          at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
          at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
          at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
          at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
          at java.awt.Component.processMouseEvent(Component.java:6505)
          at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
  </code></pre>
  
  <p>What am I doing wrong here? Any ideas?</p>
  
  <p>UPDATE: Here is the <a href="http://pastebin.com/cucRR03E" rel="nofollow">PasteBin link</a> for the full code!</p>