Java Package Classes Cannot Find Symbol
Posted on 2010-11-29
I am creating a Java program in a package called jblog. This consists of the main class BlogServer which needs to create objects of other classes in the same package.
I have stored all the Java source files for my package in a <path to source directory>/jblog
and am compiling these to the directory <path to classes directory>/jblog
When I attempt to compile the main java class - BlogServer I get Symbol Not Found errors for some of the other classes in my directory, the BlogServerInterface class (as well as other classes):
# javac -d ../../classes/jblog/ BlogServer.java
BlogServer.java:9: cannot find symbol
symbol: class BlogServerInterface
public class BlogServer implements BlogServerInterface
Both my BlogServer class and BlogServerInterface class are in the same jblog/ directory and have the package jblog line on the first line of the source file. Why can't the compiler find the BlogServerInterface class?