Updated on Kisan Patel
Java is a programming language. which inherits its object-oriented features from C-+-+. Java language was created by James Gosling, a software developer at Sun Microsystems, in 1991. It was first called Oak. which was later renamed as Java in 1995. when it was first released for public use The driving inspiration behind Java was to create something that could be used on all computers. Java has been popularized through the Internet where a huge and increasing number of corporations are adopting it internally because it can be used on all computers irrespective of the operating system. In other words, when you compile a Java program. the byte-code is generated. which can be executed across multiple operating systems. In fact. some versions of C—i-, such as Microsoft’s C#. are now modeled after Java.
Another advantage of a Java program is that it consumes less memory. For comparison with other programming languages. let’s take an example of a Microsoft Visual C++ program whose memory consumption is high. typically starting off at a minimum of 5 MB for a full Microsoft Foundation Class (MFC) program. The memory consumption of 5 MB of the Microsoft Visual C— program does not even count the Dynamic Link Libraries (DLLs) that the Windows platform needs to run the program. Due to large size. it becomes difficult to download Microsoft Visual C++ program as part of a Web page whenever required.
Java programs, on the other hand. are constructed differently. Java itself is implemented as the Java Virtual Machine (JVM). which is the application that actually runs your Java program When JVM is installed on a computer. it can run Java programs. Java programs. therefore. do not need to be self-sufficient, and they do not have to include all the machine-level code that actually runs on the computer. Instead. Java programs are compiled into compact byte-codes. and it is these byte-codes that the JVM reads and interprets to run your program. When you download a Java applet on the Internet. you are actually downloading a byte-code file In this way, your Java program can be very small because all the machine-level code to run your program is already on the target computer and does not have to be downloaded. To host Java on all computers. Sun only had to rewrite JVM to work on those computers. As your program is stored in a byte-code file, it will run on any computer on which JVM is installed.
Java programs were originally interpreted by the JVM. which performed byte-code-by-byte-code execution. thereby making interpretation a slow process. To overcome the slow process. Java 2 introduced the Just In Time (JIT) compiler. which is built in the JVM. The JIT compiler actually reads the sections of byte-codes and then compiles the sections into machine language that can be executed on the machine in less time (the whole Java program is not compiled at once because Java performs runtime checks on various sections of the code). The latest version of Java introduced by Oracle Corporation (acquired Sun Microsystems Inc.) is Java Standard Edition (SE) 7.
In this chapter. you learn about the features of Java programming language along with the introduction of new features in Java SE 7. Further, the chapter introduces you to Java platform and explains about JVM, Java Development Kit (JDK). Java Runtime Environment (JRE). and Java Application Programming Interfaces (APIs). It also discusses about downloading and installing the Java Software Development Kit. Finally, you learn how to create. compile. and run a simple Java program.
Java SE 7 is the first release of Java SE under the stewardship of Oracle Corporation. Oracle engineers cooperated with members of global ecosystem through two communities. namely, Java Community Process (JCP) and OpenJDK. to create Java SE 7. The development period of Java SE 7 was divided into a sequence of 13 milestone cycles. Moreover. Java SE 7 has come up with various new features and enhancements.