JRE vs SDK
Java is a programming language that’s used by a lot of people to create small programs that can be run across multiple operating systems and even across the internet. The resulting program is not compiled in the native code of any operating system because that would cause the resulting program to not execute in other operating systems. The program is compiled into something called java bytecode which is not understood by any operating system.
In order to execute a java bytecode, you would need to have a program that translates the bytecode into the corresponding native commands of the operating system. This is the function of the Java Runtime Environment or JRE. The JRE is simply a program that needs to be installed into a computer in order to run Java programs. There are versions of the JRE for almost any operating system that makes Java programs run on all those systems.
The Java SDK or Software Development Kit is a package that is meant to hold all the necessary tools needed to create programs in the Java programming language. A part of the package is the JRE where the programs can be run and tested. Along with the JRE are tools like a compiler, a debugger, an archiver, and more. The included tools in the package are also specific to the native environment for them to run properly.
Because of the great number of programs that have been added into the SDK to make it possible and easier to create java programs, the size of the SDK package is considerably bigger than the JRE package. This directly translates to a much longer download time if you are getting the package from the internet. It is beneficial to know whether you need the SDK or just the JRE. The SDK is only necessary for those who intend to create programs with Java, but for most people only the JRE is necessary.
These names have changed slightly as time passes by. The JRE is now called JVM or Java Virtual Machine while the Java SDK is now known as the Java Development Kit.
Summary:
1. JRE is the program that translates java bytecode into the native code of the operating system while SDK includes the JRE and additional tools to create Java Programs
2. The SDK package is bigger and therefore takes longer to download than JRE
3. Only the JRE is necessary for most users and the SDK is only for programmers