aspose file tools*
The moose likes Beginning Java and the fly likes The Java Platform Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "The Java Platform" Watch "The Java Platform" New topic
Author

The Java Platform

Kem Heyndels
Greenhorn

Joined: Jun 07, 2011
Posts: 3

Hi,

I've been trying to get my head around how the java platform works and what its components are.
On various forums I read explanations that are confusing me, e.g. "the JDK runs your java program",
while I thought the JRE does that. I think it's important to know what people are actually talking about.
I'll break my request down into two questions:
1. Is my general picture of the java platform correct?

JRE => specific instance of the JVM + JIT programs + java standard libraries
JDK => javac + JRE + console tool for accessing these features //maybe someother programs to help deploy your app

2. Is the version of the jre always the same as the jdk version?
I've seen people use jdk 1.6 and jre 1.6 as if there're the same thing.

Thanks in advance


The only good is knowledge and the only evil is ignorance. - Socrates
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36592
    
  16
Welcome to the Ranch

You will find a brief introduction to the Jlatform in the Java™ Tutorials. Click the "next" links.
You can have a JDK and JRE of different versions on the same computer; in fact you can have several JREs and several JDKs, and you can use different ones by altering the PATH you are using.
Kem Heyndels
Greenhorn

Joined: Jun 07, 2011
Posts: 3

Thnx for the quick reply ^^
I already read the tutorial, but after reading so many different posts
I end up getting confused anyway. I'll look at the path more closely
now to see which jre im on; thnx for the tip.

Cheers
ps: glad to be here
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13884
    
  10

1. Your general picture is correct. Somebody who writes "the JDK runs your Java program" is using sloppy language.

Note also the meanings of the acronyms:

JVM = Java Virtual Machine = the engine that interprets and executes Java bytecode
JRE = Java Runtime Environment = the complete car including its engine (the JVM) that adds libraries and other runtime support to run Java programs
JDK = Java Development Kit = the set of software that a programmer uses to develop Java software (the compiler and other tools)

2. Software compiled with an older JDK version should normally run also on a newer JRE. So, software compiled with for example JDK 1.5 should run unmodified on Java 6. (In practice there can be small things that make it incompatible, but Oracle is trying really hard to make newer Java versions 100% compatible with older versions).

The version numbering is a bit messy for historic reasons. There is a "developer version number" which is for example the 1.6.0 in "JDK 1.6.0". Then there is the "product version number" which is the 6 in "Java SE 6". JDK 1.6.0 is the JDK for Java SE 6. The Wikipedia page Java version history gives an overview of the names and version numbers of Java releases.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Kem Heyndels
Greenhorn

Joined: Jun 07, 2011
Posts: 3

Thanks for the feedback on my first question and the link to the wiki is helpful ^^
Now I properly know what im programming to, onto figuring out what those (messy but useful) API's have to offer

Cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The Java Platform
 
Similar Threads
JDK version vs JRE version
Hey Everyone :) question about J2SE SDK vs JDK
String class can't find split method: wrong java version?
Compiling Java Programs Without JDK Installation ??