This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java Basic question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Basic question" Watch "Java Basic question" New topic
Author

Java Basic question

Suriya chandra
Greenhorn

Joined: Apr 30, 2011
Posts: 13
I wanted to know what are JDK and JRE in layman terms...how are they of use for programming...it will be very helpful if you explain with some practical example...also please provide some info about setting variables(like class path variable) while installing java...why we need to set these variables in environment variables...how java goes to this environment variables?
Jason Bullers
Greenhorn

Joined: Dec 27, 2011
Posts: 28

Hmm, okay. I'll give it a go and get the ball rolling on this one.

Basically, the JDK (Java Development Kit) is what you need for software development. It contains all the libraries, the compiler, and probably a bunch of other stuff that I've never had to work with and so am not familiar with. It also contains everything you need to run the programs you write. Running programs is the job of the JVM (the Java Virtual Machine). The JVM is also packaged with the JRE (Java Runtime Environment). Anyone who just wants to run java applications but doesn't care about writing them just needs the JRE.

I'm not sure exactly what you mean by the second part of the question, but the classpath is what java uses to find your classes and resources in order to load everything needed to run your application. You generally specify the classpath as an argument to the 'java' command used to run the program (-cp). If I remember right, there is also a CLASSPATH environment variable you can set to do the same thing. This might explain a bit better.
Pavan Kumar Dittakavi
Ranch Hand

Joined: Feb 12, 2011
Posts: 104

this.see()

-Pavan
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Similar queries have been asked before on JavaRanch, so it might be helpful if you can also search for the related posts.


Mohamed Sanaulla | My Blog
Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 146

For the JDK, JRE,JVM refer this link

http://www.coderanch.com/t/538022/java/java/JDK-JRE-JVM
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Basic question