my dog learned polymorphism*
The moose likes Beginning Java and the fly likes what is the difeerence between jdk and jre? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the difeerence between jdk and jre?" Watch "what is the difeerence between jdk and jre?" New topic
Author

what is the difeerence between jdk and jre?

Tomendra Singh
Ranch Hand

Joined: Jun 28, 2008
Posts: 47
what are the uses of both,what jdk provides and what jre provides,

and which one have the jvm, to run any .class file on any operating system do we only need of jre.

which one have the java compiler and which one interpreter.



i am very confused about to take both , please help mr to clear these.


Strength Is Life,Weakness Is Death- Swamy Vivekanand.
SCJP 5.0(87%)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

18. What is a JVM? JRE? JDK? J2SDK?


[My Blog]
All roads lead to JavaRanch
Tomendra Singh
Ranch Hand

Joined: Jun 28, 2008
Posts: 47
thank you very much Christophe.
but still 1 am confused about interpreter.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
Java is called an interpreted language because the code is not compiled to machine code which the computer executes; rather it is converted to "bytecode" which the java program reads and passes on to the CPU in a format which the CPU can execute.
That means you can have a different java program on Linux, on Mac, on Windows, on an Intel chip, a PPC chip, etc, and the same bytecode will run on all those platforms.
Also the java program can insert some security between the bytecode and execution. "Some" security-not much, however.
Tomendra Singh
Ranch Hand

Joined: Jun 28, 2008
Posts: 47
thank you campbell.

but i also want to know that which one have interpreter.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41109
    
  45
The interpreter is part of the JVM, which is part of all Java installations, JRE or JDK.


Ping & DNS - my free Android networking tools app
 
 
subject: what is the difeerence between jdk and jre?
 
Similar Threads
Installation Query
32 bit class file on 64 bit runtime
java 1.4 and java 1.5
JDK/JRE installation
Difference between JVM and JRE