It looks like it's complaining about my constructor method, but I've checked to make sure that the arguments match the parameters in type. I'm lost, my guess is that it has something to do with my path variable.
Please help!!
Thanks again [ February 01, 2006: Message edited by: Brian LaRue ]
Ernest Friedman-Hill
author and iconoclast
Marshal
Sometimes you can get yourself into a state where your .class files come from an older version of your source, but have newer timestamps than the source; the compiler will then look at the old/new class files and not the source code, and you'll get an error like this that doesn't make sense based on the source.
Carefully delete every "Customer.class" you can find -- you might have some hiding in strange places, so look carefully -- and then try compiling again.
Whoa! That did it, interesting. I would have never guessed to try that, Thanks! [ February 01, 2006: Message edited by: Brian LaRue ]
Mamoun Jamous
Greenhorn
Joined: Jul 01, 2010
Posts: 3
posted
0
Hi everybody
Well, I've tried the magical solution you have stated but It didn't work for me.
It's true that I'm new to Java as well, so I know that my problem is a silly one.
My files are located in the following architecture, and they are copied right from a book.
c:\jws\ch01\ts\
there is two files in there, the first is TimeServer.java and the other is TimeServerImpl.java
compiling the first one would produce no problems, but since the second one is an implementation of the first, i get the following error when I try to compile it:
C:\jws\ch01\ts>javac TimeServer.java
C:\jws\ch01\ts>javac TimeServerImpl.java
TimeServerImpl.java:13: cannot find symbol
symbol: class TimeServer
public class TimeServerImpl implements TimeServer {
^
1 error
C:\jws\ch01\ts>
the first file code is:
the second file is:
thanks in advance for taking some time to review this.
Mamoun Jamous
Greenhorn
Joined: Jul 01, 2010
Posts: 3
posted
0
I've managed to compile the file, and here is how:
1. I deleted the compiled file of the first file "TimeServer.class"
2. I closed the prompt window and opened a new one and typed:
c:\> javac jws/ch01/ts/*.java
I have no idea why it worked this way, but it does.
I would feel very happy to hear an explanation
I've tried to do what you have mentioned, but it didn't work!
I've tried to compile a new file named TimeServerPublisher.java, which is located at the same folder
I tried:
c:\jws> javac ch01/ts/TimeServerPublisher.java
the error message I had is exactly the same.
I deleted all .class files, then tried again the following:
c:\javac jws/ch01/ts/*.java
and it worked perfectly for the 3 files.
is it possible that I have to compile all the files from the same location "like i've done it from c:\ for the first two yesterday, so i have to do it from the same location today for the 3rd file"? I'll try and comment later.