Lots people get confused with this.
Windows OS Shipped with default JRE not JDK
If your system does not have JRE, Any site which has applet can prompt you to download JRE automatically to your system. And you might have JRE in that scenario.
JRE: Runtime environment.
JDK: Development kit
So you can not develop java application without a JDK, what it names speaks a lot.
So in JRE you will not find java compiler which is javac.
Do not confuse yourself. Java is an open standard as per the rule every OS must have JRE.
So do not consider using JRE you can develop java program. You can run though, but to develop you must download JDK from sun site
And after download and install point your path till bin directory.
Simply for Windows
Prompt:> set path=%path%;JDK_INSTALLED DIR_HOME_PATH/bin;
e.g, set path=%path%;C:\Program Files\Java\jdk1.6.0_06\bin;
Simply for Linux
Prompt:> export PATH=$PATH:/JDK_INSTALLED DIR_HOME_PATH/bin
e.g, export PATH=$PATH:/usr/java/jdk1.6.0_06/bin