The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

No problem with code. Probably CL:ASSPATH problem

Posted by Kishori Sharan on January 25, 2002 at 4:29 PM

I compiled all your classes and it was successful. I ran the HoursTrackerGUI and I was able to see the window. Of course, I put app.show ( ) ; in main method. I think you have classpath problem in your PC. Let me describe you the steps you can try.
Suppose your .java files are in "c:\abc\HoursTracker\" folder.
1. Compile HoursTrackerGUICloseableFrame.java file. It will compile fine because it doesn't have any extrenal dependencies.
Use javac "c:\abc\HoursTracker\HoursTrackerGUICloseableFrame.java" command.
2. Compile HoursTrackerApp.java file. It will compile fine because it doesn't have any extrenal dependencies.
Use javac "c:\abc\HoursTracker\HoursTrackerApp.java" command.
3. Now you have to compile HoursTrackerGUI.java. However, this class uses the two classes compiled in steps 1 and 2. So, the you need to pass classpath (if not set already) along with javac command. YOu can compile this class as follows.
javac -classpath c:\abc c:\abc\HoursTracker\HoursTrackerGUI.java

and it should compile fine.

Thanks
Kishori




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us