JRE stands for Java Runtime Environment. Java Runtime Environment , JRE is a package that contains everything that is needed to run a compiled Java program. This includes the Java Virtual Machine (JVM), the java command ,the Java Class Library,and other infrastructure. It should be noted that for Java Runtime Environment cannot be used to create a new java programs.
The Java Development Kit or JDK is the, the full-featured SDK for Java. That means It has what the Java Runtime Environment has including the compiler (javac) and tools (like javadoc and jdb). It has the ability to create and compile java programs.
Java Runtime Environment is for people who only care about running Java programs and note compiling them. If this is you , Java Runtime Environment is all you need. However, if you to create and compile java programs , you need to install the JDK instead.
Even though some times you donot intend to do any Java development on your computer, you will still require the JDK installed. For instance, you may be in the process of deploying a web application with JSP. This means you are essentially running the Java programs inside the application server. This is the reason you would need the JDK. The reason being that the application server will convert JSP into Java servlets and needs to use the JDK to compile the servlets. There are multiple examples of his . Feel free to do more research
Top comments (0)