dear lucky
as the documentation of the classpath specifies, the classpath is not displayed by the instruction set classpath, this instruction specifies the classpath to the java interpreter so it searches the path which you give after the " C:\> set CLASSPATH " instruction for the class which you are trying to run. in other word the instruction which you typed is not complete, it misses the path to the class which you should tell the interpreter to include mainly in it's search for classes to run. you must type the instruction as follows: C:\> set CLASSPATH c:\myjavaprograms where " c:\myjavaprograms is the directory which you put your classes in and is searched by default for any class you try to run. when you set the environment variable ( which is the path of your classes ) in our example "c:\myjavaprograms", the system will search this directory for the class from anywhere you are trying to run the class. for more information try to read the LAB-1003 documentations( they can be downloaded from the java passion website ). if you find any other difficulty i will be glad to help, feel free to warn again if you didn't understand what i mean. On Fri, Jul 3, 2009 at 9:52 PM, JKid314 <[email protected]> wrote: > > Dear Java Programmer: > > I am reading documentation in the "Packages and Java Classpath" > lesson. The instructions say "To display the current CLASSPATH > variable, use these commands in Windows. . . > > > In Windows: C:\> set CLASSPATH > > > > But I received the following error in my Command Prompt, > > > "Environment variable CLASSPATH not defined." > > > I have been able to compile from the Command Prompt as well as > NetBeans IDE. Please comment? > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
