Java is a programming language and a computing platform for application development. It was first released by Sun Microsystem in 1995 and later acquired by Oracle Corporation. It is one of the most used programming languages.
Oracle has two products that implement Java Platform Standard Edition (Java SE) 8: Java SE Development Kit (JDK) 8 and Java SE Runtime Environment (JRE) 8.
JDK 8 is a superset of JRE 8 and contains everything that is in JRE 8, plus tools such as the compilers and debuggers necessary for developing applets and applications. JRE 8 provides the libraries, the Java Virtual Machine (JVM), and other components to run applets and applications written in the Java programming language. Note that the JRE includes components not required by the Java SE specification, including both standard and non-standard Java components.
The following conceptual diagram illustrates the components of Oracle’s Java SE products:
What is Java Platform?
Java platform is a collection of programs that help to develop and run programs written in the Java programming language. Java platform includes an execution engine, a compiler, and a set of libraries. JAVA is platform-independent language. It is not specific to any processor or operating system.
How Java Virtual Machine works?
By using Java Virtual Machine, this problem can be solved. But how it works on different processors and O.S. Let’s understand this process step by step.
Step 1) The code to display addition of two numbers is System.out.println(1+2), and saved as .java file.
Step 2) Using the java compiler the code is converted into an intermediate code called the bytecode. The output is a .class file.
Step 3) This code is not understood by any platform, but only a virtual platform called the Java Virtual Machine.
Step 4) This Virtual Machine resides in the RAM of your operating system. When the Virtual Machine is fed with this bytecode, it identifies the platform it is working on and converts the bytecode into the native machine code.
In fact, while working on your PC or browsing the web whenever you see either of these icons be assured the java virtual machine is loaded into your RAM. But what makes java lucrative is that code once compiled can run not only on all PC platforms but also mobiles or other electronic gadgets supporting java.
Hence,“Java is a programming language as well as a Platform
How is Java Platform Independent?
Like C compiler, Java compiler does not produce native executable code for a particular machine. Instead, Java produces a unique format called bytecode. It executes according to the rules laid out in the virtual machine specification.
Bytecode is understandable to any JVM installed on any OS. In short, the Java source code can run on all operating systems.
Trail: Learning the Java Language
This trail covers the fundamentals of programming in the Java programming language.
Object-Oriented Programming Concepts teaches you the core concepts behind object-oriented programming: objects, messages, classes, and inheritance. This lesson ends by showing you how these concepts translate into code. Feel free to skip this lesson if you are already familiar with object-oriented programming.
Language Basics describes the traditional features of the language, including variables, arrays, data types, operators, and control flow.
Classes and Objects describe how to write the classes from which objects are created, and how to create and use the objects.
Annotations are a form of metadata and provide information for the compiler. This lesson describes where and how to use annotations in a program effectively.
Interfaces and Inheritance describe interfaces—what they are, why you would want to write one, and how to write one. This section also describes the way in which you can derive one class from another. That is, how a subclass can inherit fields and methods from a superclass. You will learn that all classes are derived from the class
Object, and how to modify the methods that a subclass inherits from superclasses.
Numbers and Strings This lesson describes how to use and
String objects The lesson also shows you how to format data for output.
Generics are a powerful feature of the Java programming language. They improve the type safety of your code, making more of your bugs detectable at compile time.
Packages are a feature of the Java programming language that helps you to organize and structure your classes and their relationships to one another.
Source: What is Java Platform?