• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

The Java Platform

 
Greenhorn
Posts: 3
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 82459
594
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kem Heyndels
Greenhorn
Posts: 3
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic