answersLogoWhite

0

What is java jre and java jdk?

Updated: 8/10/2023
User Avatar

Wiki User

12y ago

Best Answer

== == JRE includes (JVM ) java virtual machine and some other library files. That runs a java application. JVM - understand the corresponding byte code of a java class and make it ready for run. The Java Runtime Environment (JRE) is an implementation of the JVM (Java Virtual Machine) that actually executes our java programs.

The Java Virtual Machine (JVM) is created, like a separate program, whenever a java program is executed. The JVM essentially runs between the computer and the java program. Java is designed so that any java program can run on any machine. This is because the JVM will interpret the Operating System independent java code and execute the commands needed for the particular Operating System you are trying to run the program on at the time.

Java Program --- Execute some command ---> JVM --- Translate the command for this computer ---> Computer

Java Virtual Machine (JVM) A Java Virtual Machine (JVM) is a set of computer software programs and data structures that use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture. As of 2006, there are an estimated four billion JVM-enabled devices worldwide. Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Hi! Java is a language and j2ee is a plateform which implements java language.

AnswerMost people say "Java" when they really mean "J2SE" (Java 2 Standard Edition).

In the context you usually see this discussed, the differences are between the J2SE and J2EE specifications. Both are ENVIRONMENTS, not just a language. In the J2SE environment, you have a standard set of libraries and a JVM (generally, this package is referred to as the JDK or JRE). In a J2EE environment, you have the full J2SE environment, plus several other components which form a framework for managing running code.

In short, J2SE is intended for running standalone programs in a "traditional" method of operation. J2EE is a framework intended to run software components in a managed way (primarily on servers), allowing for significantly better monitoring, code updating, and performance.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

CLR is Common Language Runtime basically for .Net applicatations but the JVM is Java Virtual Machine used for Java applications..

Functions of both are approximatly the same

JVM converts .Class file to the host machine code. and CLR converts IL code into native code

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Both JVMs(Java Virtual machines) and Java compilers are machine code. Instructions in the form of ones and zeroes on your computers memory. These instructions cause your processor to make hard-wired changes to your computers memory and output based on their inputs.

Java Compilers take Java source code and either turn it into machine code or turn it into Java byte code. They usually turn it into byte code.

JVMs take Java Byte code as input. The Byte code telling JVM what to do. The output being whatever you programmed you Java program to output.

The obvious question is why compile to Java Byte Code that then runs on a JVM instead of compiling to machine code.

One reason is that different computers have different kinds of processors that need different machine code to run the same program. So the program would have to be compiled for each different machine. Instead you can write and compile the program to byte code once and have the byte code run on a JVM specific to each computer. In fact you can compile many languages code to Java byte code. For example the JRuby and Jython projects. You can run the same Java progarms you run on your computer on your cell phone or anything with a JVM.

Another reason is that running code in JVMs you can add features to your language that make it easier to program such as automatic memory managment.

Finally it is possible to make different JVMs run your code in different ways.

Another major reason to use a JVM to run your bytecode, rather than a strict Java to machine code compiler is that a JVM can be much smarter than a native code compiler. The JVM can look at your program as it runs and make optimization decisions that are not possible at compile time. In addition, JVMs tend to be much better tuned to the underlying hardware than native compilers. This is because there is significantly more money spent on JVM implementations than native compiler implementations, which allows the JVMs to keep up with the intimate details of each new processor as it comes out. Thus, the "code quality" that a JVM produces will be significantly better than what is output from a native compiler.

A big advantage of a native compiler is compactness - that is, you can compile your source code into a single binary (which will include the required libraries), and then you need only run that binary. You don't have to have a whole JDK or JRE installed on the machine.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Java interpreter implements the jvm.java interpreter convert the byte code(.class files) into sytem code(operating system understandale code) than it get execute.interpreter in java is name as "java".

c:>java classname

when u put this statement ur class file gets convert into machine code(system code) & gets execute.

In my view the above answer is not completely full filled because JVM contain interpreter as well as JIT (Just In Time) compiler . Interpreter use is already given by Ashvini . Then the use of JIT is it convert the byte code(.class files) into system code(operating system understandale code) than it get execute and converted code is fetch into some memory if same statement is repeated then directly already converted code is given as result.

In Java, a JVM is a piece of software which implements the Java Virtual Machine Specification. That is, this software takes as input a stream of Java bytecodes, and executes those bytecodes according the meaning that the JVM Spec assigns them. It does this by translating the bytecode into one or more native machine code operations, specific to the hardware and Operating System that the JVM is implemented on. It is the JVM's job to present this "standard abstract machine" to people running Java code, regardless of the peculiarities of the OS and hardware the JVM runs in. Think of the JVM as a translator - you can always speak "Java" to the JVM, and it then speaks to the native OS/Hardware whatever language they understand. How the JVM does this is not relevant to the concept of the JVM - that is, the concept of JVM is independent of implementation details.

An interpreter in the Java sense is one of two things:

(a) a piece of software which reads in Java Source Code and spits out Java Bytecode directly to the JVM. In this context, the interpreter is quite naive - it reads things one line at a time from the source, and thus has very little ability to do optimization of the java bytecode. Note that 'javac' is NOT an interpreter - for, while it does take Source Code as input, and outputs Java bytecode, it saves that bytecode to a static file, and is also smart enough to do bytecode optimization, as it can look at the whole file at once.

(b) a portion of the internals of all implementations of the JVM. Here, the interpreter's job is to read the incoming java bytecodes, and translate them directly to machine code for execution. While relatively simple to do, it is also quite inefficient, as the same process must be done repeatedly with no memory of past work. For instance, if I send the interpreter three identical bytecodes, it does the same work three times. Additionally, it cannot make long-term optimization choices, as an interpreter must only work with the bytecodes it is just handed.

Example (a) above is very rare nowdays, and generally is only used in specific academic discussions. Sense (b) is what is normally assumed to be the topic of discussion when "interpreter" is mentioned.

As a consequence of the inefficiency of interpreters, most modern JVM implementations also use a Just-In-Time compiler strategy. However, JVMs still require an interpreter, as JITs can only function on the OUTPUT of the built-in interpreter - thus, the first time a running JVM encounters a bytecode sequence, it MUST be run through an interpreter to generate machine code. Only afterwards can the JIT make optimizations based on existing known bytecode->machine code work.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Both J2EE (Java Enterprise Edition) and J2SE (Java Standard Edition) are editions of Java. j2ee is used to develop server-side applications such as Java servlets and Java ServerPages. j2se is used to develop client-side objectives.

J2SE stands for Java 2 standard edition and is normally for developing desktop applications, forms the core/base API.

J2EE stands for Java 2 enterprise edition for applications which run on servers, for example web sites.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The java compiler takes the java source code (what the programmer writes) and transfers this into a bytecode (which is a lot like machine code that the computer "understands").

The java compiler takes in one or more .java file and make one or more .class files.

The JVM is a virtual computer that understands and runs the machine code like 'bytecode' which is produced by the java compiler. You use a JVM (Java Virtual Machine) to run java programs.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A compiler executes a one-time conversion of source code to object/machine code. The JVM is the Java Virtual Machine, it acts as a platform in which java programs execute for their entire lifecycle. This allows it to perform just-in-time (JIT) compilation as well as garbage collection.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Java JRE is the Java Runtime Environment.

JRE is used to run web applets, desktop applications, class applications, and any other kind of file that is coded in Java. Without JRE, you with not be able to use java.

Java JDK is the Java Developers Kit.

The Java Development Kit is used when developing Java applications. It included several important tools for programming in Java.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

The "JRE" is the Java Runtime Environment. I.e., the JRE is an implementation of the Java Virtual Machine which actually executes Java programs.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is java jre and java jdk?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

Do you hava different jre for every editionEESEME of the java platform like jdk does jre too has all the java libraries?

First of all, JDK is Java Development Kit and JRE is java runtime Environment. JDK provides compiler and all the necessary tools to write the code verses JRE provides with the environment in which the java code will run.


What's the difference between JVM and JDK?

There are two main things you can download for Java: the Java Runtime Environment (JRE) and the Java Development Kit (JDK). The JRE is used by those who wish only to run Java programs. In order to do this it uses the Java Virtual Machine (JVM) to run Java bytecode. The JDK is used by developers and contains both the JRE and the programs and libraries needed to compile and run Java programs. Simple summary: The JDK contains the JRE which contains the JVM.


JDK version is same as JRE version?

No, not necessarily. JDK stands for Java Development Kit and JRE stands for Java Runtime Environment. They can be of the same or different versions each. It is better if we have two compatible or same versions of JDK and JRE installed for ease of use.


What is difference between jdk and JRE?

Age old question. :) Simply Put: - If you need to execute any java program you need JRE (as the name says "Runtime Env"). - If you need to compile some java code you ll need JDK (as the name says "Development Kit"). One more thing to be noted is JRE will always be shipped with JDK because as I mentioned earlier JDK compiles the code, so if you want to execute the compiled code you need JRE. Hope this helps. . 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 Environment. I.e., the JRE is an implementation of the Java Virtual Machine which actually executes Java programs. Typically, each JDK contains one (or more) JRE's along with the various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.


Where do you put the javax.comm.properties file in Linux?

/usr/java/<jdk>/jre/lib/


What is jdk?

it is a ducks beak that is used to vomit out fish


What are the different versions of jdk?

There's only the JRE and JDK. the JRE (Java Runtime Environment) is equipped with the basic necessities a client (read: the average home user or business/office employee) computer would need. The JDK (Java Development Kit) contains the JRE plus development tools (i.e. libraries) for software developers to get started to writing applications with Java.


Do you need JRE if you already have JDK?

No, the JDK includes the JRE.


What is ther role of jre in java?

JRE stands for Java Runtime Environment. JRE is the runtime set up that is required by the JVM to execute java programs. The JRE and JVM (Java Virtual Machine) come packaged along with the Java Development Kit (JDK) that we download and install from the suns website to install Java.


What is difference between jvmjre and jdk?

JVM Stands for Java Virtual Machine. JVM is the virtual machine in which a java program gets executed. JRE stands for Java Runtime Environment. JRE is the runtime set up that is required by the JVM to execute java programs. JDK stands for Java Development Kit. JDK is the basic software that gets downloaded from sun's java website if anyone wants to use java.


How is JRE or JVM installed on a computer?

The JVM is part of the JRE (Java Runtime Environment) or the JDK (Java Developer Kit). Both the JDK and JRE are packages available from a variety of sources. The most common one is available from Sun (now Oracle). You simply visit the web site, and it will then download and install the JRE for you after you answer a couple of questions: http://www.java.com/


If your java program says no compiler is available what does that mean?

It means you have not installed jdk and jre in your machine...