First, are the JDK binaries in your PATH? Ie, can you type
java -version
at a command prompt and get a response or does it report it's an unknown command?
Second, what exactly are you trying to compile? One file? One package? Or a complex source tree with many classes, packages, and libraries?
If you're just doing entry-level stuff, you can get by with just providing the classpath as a parameter to the javac and java commands.
For real-world applications, I don't use the CLASSPATH environment variable because it's too limiting. Instead, I will create batch files that set the classpath depending on what I'm trying to do.
If you have a single java source file like HiDude.java...
public class HiDude{
public static void main(
String[] args)
{
System.out.println("Hi dude");
}
}
to compile this:
1) CD in the command console to the directory where HiDude.java is.
2) type javac -classpath "./" HiDude.java
That will compile it.
To run it, type
java -classpath "./" HiDude.
Good luck!