My guess is you don't have the JRE set up in your enviorment.
I would 'cd' to the directory to which the JRE was installed then go into the /bin directory and run java and javac from there to make sure it was installed correctly and that it works. After that you can add the JRE directory path to your enviornment so you can run java and javac from anywhere.
-S