title: Importing java classes
body: <p>I'm trying to make use of a java api for google voice (available here:  <a href="http://code.google.com/p/google-voice-java/" rel="nofollow noreferrer">http://code.google.com/p/google-voice-java/</a> ), google-voice-java-1.6.jar and json.jar</p>
  
  <p>My program is not finding the .jar file for import. I've made sure my classpath is pointing to the dir containing the jar files.</p>
  
  <p>My code below does not use any of the GV classes, I'm simply trying to import them. What am I doing wrong? The standard java classes import fine.</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  import java.util.Properties;
  
  import gvjava.org.json.JSONException;
  import gvjava.org.json.JSONObject;
  
  import com.techventus.server.voice.Voice;
  import com.techventus.server.voice.datatypes.AllSettings;
  import com.techventus.server.voice.datatypes.DisabledForwardingId;
  import com.techventus.server.voice.datatypes.Group;
  import com.techventus.server.voice.datatypes.Phone;
  import com.techventus.server.voice.datatypes.Greeting;
  import com.techventus.server.voice.exception.CaptchaRequiredException;
  import com.techventus.server.voice.util.ParsingUtil;
  
  @SuppressWarnings("deprecation")
  
  
  class hello {
  
  static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  static String pass = null;
  
  public static void main(String args[])
  
    {
  System.out.println("Enter Your name:");   
  
  {
  
  try {
            pass = br.readLine(); }
  
      catch (IOException ioe) {
        System.out.println("IO error trying to read input!");
        System.exit(1); }
  
  
       System.out.println(pass);
  
    } 
   } 
  }
  </code></pre>
  
  <p>I'm using java 6 under debian sid. I'm also working from the command line. I was setting my classpath as an environment variable in my .bashrc. My jars are in directory ~/java/classes. My source is in ~/java </p>
  
  <pre><code>java $ javac -cp ./classes/* hello.java 
  javac: invalid flag: ./classes/json.jar
  Usage: javac &lt;options&gt; &lt;source files&gt;
  </code></pre>
  
  <p>If I comment out the two imports from json.jar the code runs fine, so thanks all for the classpath tips.</p>
  
  <p>Fixed using -cp "./classes/*"  worked.</p>