The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001

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:

Troubleshooting Packages

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

I was trying to run Sun's mygame.zip package example (see http://java.sun.com/docs/books/tutorial/java/interpack/QandE/packages-answers.html). I was able to compile each of the three classes: Utilities.java, Client.java, and Server.java. 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?



Replies:

Sponsored Links



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