Java environment problems?

I have two classes in two different files: Card, and CardDriver (which tests Card). They're in the same folder. Card compiles okay, but when I try to compile CardDriver, I get a "cannot find symbol" error everywhere I've used the Card class. (However, it works just fine on the college computers. It seems to be my PC that's the problem.)

If I explicitly add both Card & CardDriver to a package, the error stops. My professor has suggested that it's the classpath variable on this machine, but that looks exactly the way she says it should.

Classpath:

"C:\Program Files\Java\j2re1.4.2_01\lib\ext\QTJava.zip;."

Does anyone know how I can fix this?

[710 byte] By [Jverynna] at [2007-11-26 16:44:05]
# 1
When you compile, try adding the current directory to the classpath. For example, if you're in a Windows environment, use the following command:javac -cp .;%classpath% CardDriver.java~
yawmarka at 2007-7-8 23:11:23 > top of Java-index,Java Essentials,New To Java...
# 2

Here's what I got when I tried that:

C:\Documents and Settings\Administrator\My Documents\Java\Cards>javac -cp .;%cla

sspath% CardDriver.java

'javac' is not recognized as an internal or external command,

operable program or batch file.

C:\Documents and Settings\Administrator\My Documents\Java\Cards>java -cp .;%clas

spath% CardDriver.java

Exception in thread "main" java.lang.NoClassDefFoundError: CardDriver/java

Jverynna at 2007-7-8 23:11:23 > top of Java-index,Java Essentials,New To Java...
# 3

> Here's what I got when I tried that:

> C:\Documents and Settings\Administrator\My Documents\Java\Cards>javac -cp .;%classpath% CardDriver.java

> 'javac' is not recognized as an internal or external

> command, operable program or batch file.

Your environment is not configured properly. Please install Java as per the instructions here:

[url=http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html]Installation Notes - Java SE 6 Microsoft Windows (32-bit)[/url]

~

yawmarka at 2007-7-8 23:11:23 > top of Java-index,Java Essentials,New To Java...
# 4

I've installed the latest version of Java as per the installation notes. This included updating the PATH variable as suggested.

PATH now reads:

"%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;c:\php;C:\Program Files\MATLAB71\bin\win32;C:\Program Files\Java\jdk1.6.0\bin"

However, I still recieve the same error. Do you have any further suggestions that I could try?

Jverynna at 2007-7-8 23:11:23 > top of Java-index,Java Essentials,New To Java...