Vous êtes sur la page 1sur 2

Question What's the difference between "JDK" and "JRE"?

Question What's the difference between "JDK" and "JRE"? Topics Java:Language, Java:Implementation, Tools, JDK Author John Mitchell PREMIUM Created May 8, 2000 Modified May 8, 2000

Answer The "JDK" is the Java Development Kit. I.e., the JDK is bundle of software that you can use to develop Java based software. The "JRE" is the Java Runtime Enviro nment. I.e., the JRE is an implementation of the Java Virtual Machine which actu ally executes Java programs. Typically, each JDK contains one (or more) JRE's along with the various developm ent tools like the Java source compilers, bundling and deployment tools, debugge rs, development libraries, etc. Yes JRE is Java Run Time Environment. The java programming language adds the po rtability by converting the source code to byte code version which can be interp reted by the JRE and gets converted to the platform specific executable ones. Th us for different platforms one has corresponding implementation of JRE. But JRE has to meet the specification JVM (Java Virtual Machine) Concept that serves as a link between the Java libraries and the platform specific implementation of JR E. Thus JVM helps in the abstraction of inner implementation from the programmer s who make use of libraries for their programmes. The JDK(Java Developmental Tool kit) comes along with java libraries and JV M embedded in it. Apart from these it comes along with the utility tools for byt e code compilation "javac", Executing the byte codes through java programmes thr ough "java" and many more utilities found in the binary directory of java. Speak ing practically JDK is essential for developers, which comes along with library packages to develop Software programmes. While JRE is minimal set of programmes which executes the java class files developed by the software developers. JRE, 'Java Rutime Environment' performs the execution of java programs but JDK, 'Java Development Kit' which contains the java compiler is helpful in developing java based programs. Infact one or more JRE's along with various development an d deployment tools are present in a JDK. What if you have JDK only and u purposely delete > JRE directory and set your path and class paths to > JDK. > > Can you still run your all programs? No.

> I specially mean applets because i have some security > issues with JRE. The separately installed (public) JRE is exactly the same (except it's missing a server jvm) as the JRE in the JDK. The difference is that the public JRE has en tries in the Registry that allow browsers and applets to use the Java Plugin tha t's part of the JRE. These entries do not exist for the JDK's JRE, so these type s of programs will not work with that JRE. The security "problem" would exist, regardless, since the jvm is what controls s ecurity, and it's the same in both JREs. Java applications that run from the commandline can use the JDK's JRE as long as the appropriate path information (that points to that JRE's \bin\ directory) is given to the java command.

Vous aimerez peut-être aussi