The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



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.


Troubleshooting Packages

Posted by Matt on July 18, 2001 at 12:18 PM

I was trying to run Sun's package example (see I was able to compile each of the three classes:,, and However, when I tried to execute Server.class, which imports Client.class and Server.class (each of which are in different packages), I got a class not found exception. I checked the classpath and it was set up correctly. That is, it pointed to the directory, "Sample Java Code", which contained the mygame directory. If I commented out the statement "package mygame.server;", it worked.

Why does this occur? How can I fix the problem without commenting out the package statement? Is there a problem with my Java 1.3 installation?


Sponsored Links

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