• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK and JRE  RSS feed

 
Hardik Patel p
Ranch Hand
Posts: 40
Hibernate Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,

JVM - Java Virtual Machine interprets the byte code into the machine code.
JRE - Supported Lib + JVM
JDK -Development environment + JRE + JVM

JDK is already contains JRE. Whenever we want to develop any java program then we have to install JRE as well as JDK. If we install JDK only then it will not work. I cant understand why it need JRE while JDK already contain JRE.

Please explain.

Thanks
Hardik
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not normally need to install the JRE and JDK separately, as the JDK already contains a JRE.
 
Knute Snortum
Sheriff
Posts: 4288
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking why does the JDK package ask you if you want to install the JRE?

The way the JDK is packaged, it uses the same installer for the JRE as the JRE only package. It seems like you're installing two things, but it's just the way it works. Oracle didn't want to completely rewrite the JRE installer inside the JDK installer. This is actually good design.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!