Thursday, February 27, 2014

Difference between Eclipse and JDK?
































































The JDK is a set of tools used for creating and manipulating Java code. It includes things like javac that converts your .java files into byte code and the jar tool that helps build jars. Recommended reading: Java Development Kit - Wikipedia, the free encyclopedia
































































The JRE is a set of tools used for running byte code, which is created by the JDK. Recommended reading: Java virtual machine - Wikipedia, the free encyclopedia
































































The JDK contains a JRE, because it doesn't make a ton of sense to be able to create code that you can't run.
































































An IDE is completely separate from either the JDK or the JRE, and it's just a fancy text editor with tools that make programming easier. An IDE might use the JDK to compile your code into .class files, and it might use the JRE to run those .class files. Recommended reading: Integrated development environment - Wikipedia, the free encyclopedia
































































A programmer uses an IDE to write Java code and the JDK to take that code and compile it into byte code. An end-user (the person you send your program to) uses the JRE to run that byte code.
































































Think of it this way: You use Word (which is like an IDE) to write a document (which is like Java code). You then use a converter program (which is like the JDK) to convert that document into a PDF (which is like byte code). You send the PDF to your friend, who uses a PDF viewer (which is like the JRE) to view the document.































































































































No comments:

Post a Comment