title: I can't solve my <identifier> expected error, and dont know why
body: <p>Ok, so im super, extra, brand new to java coding, but im slowly getting all the terms. But the real issue is this error. I'm trying to do a little coding snippet that, when started, will open a batch file (i'm much more experienced with them). I searched very much for answers, but nothing solved it, so i had o post about my specific situation.</p>
  
  <p>This is said code:</p>
  
  <pre><code> public class Startbat {
   public static void main(String[] args){
      try {
          Runtime.getRuntime().exec("cmd /c start hello.bat");
          }
      catch (IOException) {
          System.out.println ("Something is wrong here...");
          }
   }
  }
  </code></pre>
  
  <p>and when i try to javac it, i get this:</p>
  
  <pre><code>C:\Users\Owner&gt;javac -g "C:\Users\Owner\Desktop\codes\codes\Startbat.java"
  C:\Users\Owner\Desktop\codes\codes\Startbat.java:6: error: &lt;identifier&gt; expected
  
              catch (IOException) {
                                ^
  1 error
  </code></pre>
  
  <p>I have found that the error I get is about the catch line/block not being in a method, when I have definitely made sure that it IS within the main.</p>
  
  <p>I had a few error with the exception there, but i guess i solved it. i don't know what the exception would have been ((meaning how would that IOException occur from the runtime.exec stuff) meaning does that mean it won't start the batch file if it does get to work?).</p>
  
  <p>Any help would be appreciated, even if its just "This is impossible to do"</p>