File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Problem with MSDOS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with MSDOS" Watch "Problem with MSDOS" New topic

Problem with MSDOS

S Perreault
Ranch Hand

Joined: Oct 29, 2003
Posts: 37
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: (interface) and (Implementor of Calculator)
Code for both:

I can open up a DOS window and compile the interface with no problem. If I attempt to compile the class, I get this error:

Thanks for any ideas!
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Your classpath probably does not include the current directory. Either run:
javac -classpath .
Or compile them both at the same time:
javac Calculator*.java

[How To Ask Questions On JavaRanch]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1873
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.
S Perreault
Ranch Hand

Joined: Oct 29, 2003
Posts: 37
Yup, I totally forgot that I wasn't compiling it from the root.
Thanks for the heads up!
I agree. Here's the link:
subject: Problem with MSDOS
It's not a secret anymore!