I feel stupid even writing this but I am having trouble compiling a class that implements an interface. Both the class and the interface are in the same directory. For instance, I am working on the RMI example on the Sun site and I have two files: Calculator.java (interface) and CalculatorImpl.java (Implementor of Calculator) Code for both:
I can open up a DOS window and compile the Calculator.java interface with no problem. If I attempt to compile the CalculatorImpl.java class, I get this error:
Hi Assuming, 1. you have the directories with names, suncertify and test where test is subdir of suncertify and 2. you have your .java files in suncertify\test\ 3. and just for simplicity you have suncertify folder in C:\> then you can do following, C:\>javac suncertify\test\*.java And see if that works. Its usually recommended that we have the same source hierarchy as in package names and with packages, I have "never" tried to compile the code via going into any of the package directories and then do javac. Always be in "parent of the package directory and compile all sources via *.java thing"... Hope this solves your problem. Regards Maulin
Joined: Oct 29, 2003
Maulin, Yup, I totally forgot that I wasn't compiling it from the root. Thanks for the heads up! Perogi.