title: Unable to count vowels using java multithreading
body: <p>This is what I am trying to do:</p>
  
  <p><a href="https://i.stack.imgur.com/9h0nC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9h0nC.png" alt="enter image description here"></a></p>
  
  <p><strong>CountVowel.java</strong></p>
  
  <pre><code>package lab2;
  
  
  /**
   *
   * @author Shyam
   */
  
  public class CountVowel implements Runnable {
      String[] input;
      int vowels = 0;
      char ch;
  
      public CountVowel(String[] args) {
          input=args;
      }
  
      public void run() {
          try {
          for (int i = 0; i &lt; input.length; i++) {
                  String s = input[i];
  
                  for (int j = 0; j &lt; s.length(); j++) {
                      ch = s.charAt(j);
  
                      if (ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch == 'o'
                              || ch == 'O' || ch == 'u' || ch == 'U')
                          vowels++;
                  }
              }
              System.out.println("Vowels : " + vowels);
  
          } catch (Exception e) {
          }
      }
  
  }
  </code></pre>
  
  <p><strong>VowelThread.java</strong></p>
  
  <pre><code>package lab2;
  
  
  /**
   *
   * @author Shyam
   */
  
  import java.io.IOException;
  
  public class VowelThread  {
  
      public static void main(String[] args) 
                  throws IOException {
          for (String str : args) {
              System.out.println(str);
          }
          Thread t1 = new Thread(new CountVowel(args));
          t1.start();
      }
  }
  </code></pre>
  
  <p>I have tried different approach as below to enter string in cmd however I am not getting desire out put.</p>
  
  <p><a href="https://i.stack.imgur.com/Cb5Db.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cb5Db.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/4pJUt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4pJUt.png" alt="enter image description here"></a></p>
  
  <pre><code>C:\Users\Shyam\Documents\NetBeansProjects\lab2\src&gt;java VowelCounter hello hello see you in
  Error: Could not find or load main class VowelCounter
  
  
  C:\Users\Shyam\Documents\NetBeansProjects\lab2\src&gt;javac -cp . lab2\VowelThread.java hello hello see you in london
  error: Class names, 'hello,hello,see,you,in,london', are only accepted if annotation processing is explicitly requested
  1 error
  </code></pre>
  
  <p>I would appreciate your help.</p>