Javac is working but not java

PLEASE HELP.
I've got a project due very soon, and I can't get very far until I can run my apps.
Thank you,
Dustin
1.
I CAN compile a single .java file if it does NOT refer to any class outside of itself.
2.
I CAN'T compile a .java file if it refers to another class outside of itself (even if it's with in the same directory.
3.
If I comment out the line that refers to an outside class then I can compile the .java file.
HOWEVER, When I run the 'java Ap00.class' command, I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Ap00/class.
This also applies to the above part 1. I can't work the .java command no matter what.
4. Here is my
classpath:
".;C:\j2sdk1.4.1_01\lib;C:\Prog\AudioPlayer;"
Path:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\Program Files\Common Files\Autodesk Shared\;C:\j2sdk1.4.1_01\bin
They look alright to me.
5. Yes, this program used to run just fine. I have not altered it. Everything got screwy when I upgraded to WinXP.
6. Everything works fine inside of a an IDE like Forte.
Ap.00 compiles and runs.
It seems that the answer is right under my nose, but I just can't put it together.

Open a console window.
Type the following
echo %CLASSPATH%
The output is your class path. (Do not guess what it is. Follow the above to find out exactly.)
Your classes do NOT have packages right?
You can test a class path with the following even if there is no 'main' in the class.
java MyClass
If you run the above and you get a no class found error, then your class path is wrong. If you get a 'no main' (or it runs) then the class path is right.
This part of your classpath "C:\j2sdk1.4.1_01\lib" is non-sensical. I doubt you are putting your classes in there. And java itself uses jars and that will not pick them up. Remove it.
When you run you are in the directory where the class files are correct? Or they are in "C:\Prog\AudioPlayer"

Similar Messages

Maybe you are looking for

  • Not able to access HTMLDB from another server running HTTP_SERVER

    Hi I had htmldb installed and running from dataabse server but then I moved APACHE server to another server. Here Apache is running from OEM 10g grid control I set up dad.conf and marvel.conf files for connection to htmldb server. Also I created marv

  • Need details for the following feilds

    Hi Gurus, Need mapping feild names ECC vs BI for these feilds.. 1)Journal Header ID and Line Number 2)Journal Entry Line Description 3) Journal Entry Header ID and 4)Journal Entry Name I have a requirement to send these details details to the legacy

  • JAAS - Solaris Login Module

    Hi all, Iam trying to use Solaris Authentication as backend.Iam using JAAS 1.0, jdk1.3.x I downloaded the tutorial from Sun's web site and changed the JAAS configuration file to use SolarisLoginModule In the code, i call the LoginContext's login() me

  • Automatic Service Settings

    Hi The company I'm working for recently bought an XServe and I and a co-worker had the job to set it up. Almost everything went well and we are about to migrate everybody (about 30 employes) into using this new server. However, there are things we wo

  • What does error code: OSStatus = -39 mean?

    I've been trying to burn some video dvds, with Adobe Encore CS5, from a disk image saved to my desktop. I keep getting the error message: OSStatus = -39. I've tried Googling it, & have come up with nothing. I called Apple. They said it may or may NOT