I have searched around the difference between JDK and JRE but without much luck. Could you please tell me what the difference between them?
In order to compile and run Java, I know we need JRE, but what the purpose of JDK. I have downloaded j2sdk1.4.2_06 from Sun. After I install it, it created a directory called "j2sdk1.4.2_06" under C:/ drive. Under the Program Files directory, a directory called "Java" which contains a subfolder of "j2sdk1.4.2_06" is also created. Could you please tell me in this case, which one is JRE and which one is JDK? Why do I need both of them. They are quite similar to me.
The basics are: JRE == Java Runtime Environment JDK == Java Developer's Kit SDK == Software Developer's Kit JVM == Java Virtual Machine *JDK and SDK are sometimes interchangeable.
I'm not sure why you have two different directories with the same name (on at the root of C: and the other in Program Files), but it could have to do with multiple installations of the SDK/JDK. I have two different directories (but in the same folder) of jdk1.5.0 and j2sdk1.4.2_06. Someone else might be better for answering that part of your question.