Setting CLASSPATH in Eclipse
807598Oct 28 2006 — edited Oct 29 2006I'm trying to learn Java using a book I bought. The book came with some useful classes that are used in many of the examples and part of a package. I modified my CLASSPATH environment variable to include the directory where these classes are located and when I compile from the command prompt, everything works fine. Typically, I include the line:
import package_name.*;
at the top of my Java programs and compile using the following command:
javac program_name.java
I would also like to learn Eclipse as it seems to be a great IDE. However, I can't for the life of me figure out how to make sure that Eclipse finds the correct class libraries or how to update the CLASSPATH variable in Eclipse.
When I try to compile my programs in Eclipse with the same import statement above I consistently get an error that Eclipse cannot resolve the package name.
I would appreciate any help on how to correct this and what steps I need to take to tell Eclipse where to look for packages.