Cannot find symbol : when compiling java code
<p>I am writing some Java classes to implement RMI. I wrote all the classes and the program worked fine. But from the very next day I am getting a compiler error indicating that the absence of files:</p>

<p>Filename: <strong>ServerInterface.java</strong></p>

<pre><code>import java.rmi.*;

public interface ServerInterface extends Remote
{
  public double sum(double[] temp) throws RemoteException; 
};
</code></pre>

<p>Filename: <strong>ServerImplement.java</strong></p>

<pre><code>import java.rmi.*;
import java.rmi.server.*;

public class ServerImplement extends UnicastRemoteObject implements ServerInterface
{

 public ServerImplement() throws RemoteException 
 { 
 }

 public double sum(double[] temp) throws RemoteException
 {
   double sum=0;
   int len=temp.length;
   for(int i=0;i&lt;len;i++)
     sum+=temp[i];

   return sum;
 }
};
</code></pre>

<p>Even to prove that its not any filename errors:</p>

<pre><code>F:\E\java\rmi final&gt;dir
 Volume in drive F is My Volume
 Volume Serial Number is E0F9-4F89

 Directory of F:\E\java\rmi final

22-01-2011  23:23    &lt;DIR&gt;          .
22-01-2011  23:23    &lt;DIR&gt;          ..
22-12-2009  13:09             1,849 additionImplementer_Stub.class
21-01-2011  21:52             1,076 Client.class
18-01-2011  02:54               649 Client.java
21-01-2011  21:52             1,847 ClientTry.class
18-01-2011  02:54             1,268 ClientTry.java
21-01-2011  21:52               444 ServerImplement.class
18-01-2011  02:30               386 ServerImplement.java
18-01-2011  02:54             1,783 ServerImplement_Stub.class
21-01-2011  21:54               209 ServerInterface.class
22-12-2009  12:07               132 ServerInterface.java
21-01-2011  21:52               919 ServerMain.class
18-01-2011  02:36               409 ServerMain.java
          12 File(s)         10,971 bytes
</code></pre>

<p>If I try: <code>javac *.java</code> , it works fine (but trying java on any of the .class files leads to error : <code>Exception in thread "main" java.lang.NoClassDefFoundError: ServerMain</code></p>

<p>If I try <code>javac ServerImplement.java</code> I get an error (in fact none of my java programs are able to link):
(I am in the same directory)</p>

<blockquote>
  <p>E:\java\rmi final>javac  ServerMain.java<br>
  ServerImplement.java:4: cannot find symbol<br>
  <code>symbol: class ServerInterface</code><br>
  <code>public class ServerImplement extends UnicastRemoteObject implements ServerInterface</code><br>
  <code>^</code><br>
  <code>1 error</code>  </p>
</blockquote>

<p>The program is even working fine at my college lab. Should I reinstall JDK? Or is there any way to provide linking explicitly?</p>
