title: How to Run a Simple Java Program in Eclipse?
body: <p>As you can probably understand from the question itself, I'm new to Java.
  I was given an exercise to write a Java program which receives a character, prints it and the next character in the Unicode table.</p>
  
  <p>Now, I have the solution to this exercise:</p>
  
  <pre><code>public static void main(String[] args){
      char c = args[0].charAt(0);
      char c1 = (char)(c + 1);
      System.out.println(c + "\t" + c1);
  }
  </code></pre>
  
  <p>I understand basic idea of this code, but I'm trying to run this code in Eclipse I get an annoying error:</p>
  
  <p>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
      at MainClass.main(MainClass.java:9)</p>
  
  <p>Note: I have yet to run a Java program that actually receives something as a parameter so I guess it's a stupid beginners' mistake... Here is the full code that I tried to compile in Eclipse:</p>
  
  <pre><code>public class MainClass {
  
      /**
       * @param args
       */
  
      public static void main(String[] args){
          char c = args[0].charAt(0);
          char c1 = (char)(c + 1);
          System.out.println(c + "\t" + c1);
      }
  }
  </code></pre>
  
  <p>Thanks in advance</p>