Not sure are you asking about this,
JRE [ Java Runtime Environment ] = JVM [ Java Virtual Machine itself] + Java Core Libraries and support system
Simply if you can't understand that way, think JVM is just as a computer processor or hardware and JRE as a
full computer with firmware. [ primitive BIOS and DOS calls, not naked like just only a processor'].
now what is JDK?
JDK = JRE + Java Compiler +other support build tools [like jdb java debugger] + developer libraries
how 'developer' library is differs from a normal library is developer library have the debugging symbol table [in C++]
however in java there may be more annotations than that.
so what is a library?
Believe me when I'm telling you , I'm really sick of explaining this to ppl who thinks java is the whole universe.
To explain this it's essential to dig into at least "C" program level.
if you have a linux installed machine with gcc , practice there exercises.
http://www.yolinux.com/TUTORIALS/Librar ... namic.html
epically with the tools like 'nm' and 'objdump' and understand how a compiler select a name to function/variable.
it's very important to be a good programmer. And there's no war here, if Java section moderator thinks
this is too native to machine level you are free to remove this post.
So what is API?
Application Programming Interface.
so if you have done BIT 2nd year subject like Object Oriented Analysis and Design then you'd be able to
know what is meant by an interface. This is also harder to explain without going into at least "C" programming
level. BTW , I like to take a simple example for you, think you need to drive a car , and it's obvious that you
don't need to know the how internal combustion engine works in-order to ride the car, instead you should
be familiar with the driving wheel, brake system ,brakes lights horn etc. So that's where the encapsulation
concept comes from.The unnecessary details have been hidden from third party programmers.
In "C" a particular header file is the interface for a library, it contains only the extern prototype for the
function.Read the given link about and there's no use of duplicating information all around the net.If you
don't understand just ask.
Like that Operating Systems Windows /Linux supports API model, in linux it's POSIX and windows it's win32.
When you want to Create a window on the screen you don't need to worry or write the code to
communicate with your graphics card and write to pixel buffers and deal with other input/output registers.
your OS will took care all for ya. so in that case we can say OS is providing an API to the 3rd party
programmer.
In java also the situationist is same,actually JRE is more than a virtual machine ,a virtual machine with a
OS or Firmware installed. And I want to mention also , Java GUI frameworks are not core java libraries,
they are cumming with JRE and JDK yes,and in all machines where java is. But they , SWING /AWT are not
core java libraries.libraries like java.system.* are core java libraries and exists every JRE. basic functions
like standard input /output , memory management ,basic threads , garbage collection help basic os events and signalling are part of a core library. ATW/Swing is a bundled package to the JRE/JDK, because you can see JRE in mobil phones does not have a AWT/SWING.