0

Possible Duplicate:
What is the difference between JDK and JRE?

What is the main reason you would use one against the other? When exactly you are supposed to use JRE and when exactly to use JDK? What are the factors considering making your decision?

Community
  • 1
  • 1
sheidaei
  • 9,842
  • 20
  • 63
  • 86

3 Answers3

5

In order to run Java code, you need a JRE: a Java Runtime Environment.

In order to develop Java code, you need a JDK: a Java Development Kit. The JDK includes a JRE.

Matt Ball
  • 354,903
  • 100
  • 647
  • 710
1

The JRE contains no compiler, so for developing Java applications you need the JDK, which ships a compiler and other development tools.

akluth
  • 8,393
  • 5
  • 38
  • 42
0

The JDK contains the Java compiler which compiles your java code to the intermediate bytecode which is then executed inside the JVM. The JRE bundles together the JVM and several standard java class libraries which may be called by your program. In order to compile java programs you would need the JDK , but to run java programs, you only need the JRE installed on your system.

adi
  • 580
  • 2
  • 12