From my main program A.java, I need to call another class (B) which is in a .jar file. But I don't have the source code for B. How do I get A to compile? (What should the import look like?) Thanks, Irshad
There is nothing special about the import. In fact, most of the standard Java API classes are found in a jar file. The main difference with a third-party jar file is that you need to add it to the CLASSPATH variable. You can either do this directly to the environment variable, which will cause the jar file to be searched for all Java programs you write, or you can use the command line options for javac. If you don't plan on using the jar file for other projects, I would suggest the later.