This section of the Java programming tutorial covers the complete history of Java Programming Language. Let’s have a look at the topic now.
Table of Contents
History of Java Programming Language
Java was developed in the 1990s by James Gosling. It is an object-oriented language for programming. This project was started by the team to develop a vocabulary for digital devices like set-top boxes, TV, etc.
Java may seem to have been deliberately developed for the World Wide Web. Ironically enough, however, Java was developed independently of the web and went through several stages of metamorphosis before reaching its current status as the World Wide Web programming language. Below is a brief Java background.
Oak: According to Java FAQ, it is widely believed that Bill Joy, currently a vice president at Sun Microsystems, was the person who conceived the idea of a programming language that later became Java. Joy wanted to design a vocabulary in the late 1970s that incorporated MESA and C’s best features.
Joy concluded that C++ was insufficient for the job in an attempt to rewrite the UNIX operating system in the 1980s. To write short and efficient programs, a better resource was required. It was this ability to create a good computing tool that in 1991 propelled Joy in the path of Sun’s “Stealth Project,” called by Sun’s chairman, Scott McNealy.
Java was released by James Gosling in June 1991 as a project called “Oak.” Gosling aimed to create a virtual machine and language with a common C-like syntax with greater consistency and usability than C / C++. In 1995, Java 1.0 was the first official version.
It made the promise of “Write Once, Run Anywhere” on popular platforms with free run times. It was fairly secure and configurable for its protection, providing restricted access to the network and folder. In a stable “applet” environment, the major web browsers quickly integrated it into their default setups. popular quickly.
With the introduction of “Java 2,” new versions for large and small platforms (J2EE and J2ME) were soon produced. Sun has no plans for a “Java 3” announced.
In 1997, to formalize Java, Sun approached the ISO / IEC JTC1 standards body and later Ecma International, but quickly withdrew from the process. Java remains a de facto proprietary interface governed by the Java Community Process.
Sun makes most of its Java applications available free of charge, generating revenue from customized services like the Java Enterprise System. Sun differs between its Software Development Kit (SDK) and Runtime Environment (JRE), which is a variant of the SDK, mainly because the compiler is not included in the JRE.
Origin of different versions of Java
|JDK Beta||It released in 1995|
|JDK 1.0||It released on January 23, 1996|
|JDK 1.1||It released on 19 February 1997.|
|J2SE 1.2||It released on 8th December 1998|
|J2SE 1.3||It released on 8th May 2000|
|J2SE 1.4||It released on 6th February 2002|
|J2SE 5.0||It released on 30th September 2004|
|JAVA SE 6||It released on 11th December 2006|
|JAVA SE 7||It released on 7th July 2011|
|JAVA SE 8||It released on 18th March 2014|
|JAVA SE 9||It released on 21s September 2017|
|JAVA SE 10||It released on 20th March 2018|
|JAVA SE 11||It released on September 2018|
|JAVA SE 12||It released on 19th March 2019|
Philosophy of Java Programing
The development of the Java language had five primary goals: 1.
- It should use the framework of object-oriented programming.
- It should allow multiple operating systems to run the same program.
- It should include built-in computer network support.
- It should be configured to safely execute code from remote sources.
- Selecting what was perceived to be the good parts of other object-oriented languages should be easy to use.
Java programmers often find it necessary to use extensions like CORBA, Internet Communications Engine, and OSGi to achieve the goals of networking support and remote software execution.
The first function, the orientation of the object (“OO”), corresponds to a programming process or language layout. While there are many interpretations of OO, one main distinctive concept is to model software to integrate the various types of data it manipulates with their operations.
It incorporates data and code into structures called objects. An object can be viewed as a package of actions (code) and state (data) stored in itself.
The idea is to separate things that change from those that stay the same; a change to some information structure always involves a similar update to the code that operates on that data and vice versa.
This classification into cohesive entities provides a more consistent framework for the development of a software system. The aim is to promote the management of large software programs, thus improving quality and reducing the number of failed projects.
OO programming’s other primary goal is to develop more standard objects to make code more interchangeable between projects. For example, a standard “customer” entity should have essentially the same specific set of behaviors between different software projects, especially when these projects intersect at some fundamental level as they often do in large organizations. Ideally, software objects can be regarded more as pluggable modules in this way, allowing the software industry to build projects primarily from current and well-tested parts, resulting in a massive reduction in production times. Reusability of code has experienced mixed practical results, with two major difficulties: poor understanding of the nature of essentially standardized objects, and lacking a framework for broad interaction of reuse opportunities. Through supplying writers with opportunities to disseminate information about traditionally reused objects and artifact collections, many open-source groups want to help ease the question of reuse.
The second feature, platform independence, ensures that programs written in the Java language have to run on different hardware in the same way. One should be able to write and execute a program somewhere once.
Most Java compilers do this by translating “halfway” Java language code to bytecode (specifically Java bytecode)—simplified Java-specific system instructions. The code is then run on a virtual machine (VM), a program written on host hardware in the native language that interprets and executes Java bytecode universal.
Also, structured libraries are offered to allow seamless access to host machine features (such as graphics, threading, and networking). Notice that the JIT compiler interprets and translates the Java bytecode to native machine instructions at some point, although there is a specific compilation step.
There are also Java compiler implementations that compile to native object code, such as GCJ, avoiding the intermediate bytecode level, but only one architecture can run the performance of these compilers.
Sun’s Java license relies on “compatibility” with all implementations. This culminated in a legal dispute with Microsoft after Sun argued that the design of Windows did not support the interfaces RMI and JNI and implemented their platform-specific features. Also, Microsoft is no longer shipping Java with Windows, and Internet Explorer is unable to support Java applets without a third-party plug-in in new versions of Windows. Nevertheless, for those and other versions of Windows, Sun and others have made Java runtime systems usable at no charge.
The language’s first applications used a virtual machine designed to ensure portability. Such implementations created programs that were running faster than software compiled to native executables, e.g. written in C and C++, so the language had a reputation for poor performance. Most modern JVM implementations, use multiple techniques, generate programs that run significantly faster than before.
The first approach was essentially to compile as a more conventional compiler directly into the native language, totally ignoring bytecodes. It fits well, but at the cost of portability. Another method, known as just-in-time compilation (JIT), at the time the program is running, converts the Java bytecodes into the native language, resulting in a program running faster than interpreted code, but also requiring overhead compilation during execution. More advanced VMs use adaptive recompilation which helps the VM to evaluate the running program’s actions and selectively recompile and customize essential program pieces.
Dynamic recompilation could obtain superior optimizations to static compilation because the dynamic compiler may base optimizations on information about runtime environment and packed category configuration. JIT compilation and dynamic recompilation allow Java programs to benefit from native code speed without losing portability.
Portability is a technically difficult goal to achieve, and it has skewed the performance of Java at that goal. Although it is still possible to write Java system programs that behave uniformly across many host systems, the vast number of available platforms with small errors or anomalies prompted some to mock Sun’s slogan “Write once, run everywhere” as “Write once, debug anywhere.”
Nonetheless, platform-independent Java is very popular for server-side software, such as Web services, databases, and Enterprise JavaBeans, as well as OSGi-based embedded systems, utilizing Embedded Java environments.
Automatic garbage collection
One concept behind the automated memory management system in Java is to spare programmers the burden of manual memory management. The developer allocates memory in some languages to build some objects stored on the heap and is responsible for handling the memory manually later to erase any such objects. If a programmer forgets to manage memory or writes code that fails to do so on time, a memory leak can occur: a potentially arbitrarily large amount of memory will be used by the program. Therefore, if a memory area is twice shared, the system can become volatile and crash. Finally, there is a certain degree of overhead and user-code sophistication to manage and finalize assignments in non-garbage collected areas.
In Java, automated garbage collection eliminates this potential problem. Once objects are created, the developer decides, and the Java runtime is responsible for managing the lifecycle of the object. The software or other entities may access an object by keeping a reference to it (which is its address on the heap from a low-level point of view). The Java garbage collector dynamically deletes the unattainable object when no references to an object exist, clearing memory and avoiding memory leakage. Memory leakage may still exist when the software of a developer includes a connection to an object that is no longer needed — in other words, it can still occur at lower theoretical levels.
It may also impact programming paradigms by using garbage collection in a script. It allows thread-isolation (no need to synchronize because different threads operate on different object instances) and data-hiding with the low cost of potential performance penalties (inner-loop creation of large/complex objects). Using temporary permanent value variables minimizes the coding of side effects.
Comparing Java and C++, similar features can be introduced in C++ (for example, a memory management system for specific classes can be built in C++ to improve speed and significantly reduce memory fragmentation), with the potential cost of extra development time and some complexity of applications. In Java, garbage collection is built-in and the programmer is virtually invisible. That is, programmers may have no idea how garbage collection should take place as it may not coincide with any behavior that the code they write directly executes. This can be positive and disadvantageous depending on the intended application: the programmer is not allowed to perform low-level functions, but at the same time lacks the opportunity to write lower-level code.
Java’s syntax is largely based on C++. Everything in Java is an object except for atomic data types (ordinary or actual numbers, boolean values, and characters) and everything in Java is written in a class.
An applet is a Java application that can be embedded into a web page. This runs within the browser and operates on the hand of the server. Using the APPLET and OBJECT tag, Applet is embedded in an HTML page and hosted on a web server. Applets are used to make the website more fun and interactive.
Use the HTML element to put an applet in an HTML file. The applet tag has three specified attributes: code=”Hello “sets the Applet class name and width=”200” height=”200 “sets the applet’s pixel length and height. (Applets may also be inserted in HTML using either the object or the embed element, but web browser support is inconsistent for these elements.
A Java servlet is a Java component that extends database functionality. It accepts and addresses web server requests, usually via HTTP, the HyperText Transfer Protocol.
Swing Application Framework (JSR 296) is a Java standard for a basic swing application framework with a computer software graphical user interface (GUI). This describes technology common to most desktop applications, allowing building Swing applications simpler. It’s now dropped.
Look and feel
The standard look and feel for Java-written GUI apps using the Swing toolkit are very different from native apps. Swing’s pluggable look and feel device can define a different look and feel. Sun includes Linux, GTK and Motif copies. Apple also offers an Aqua look and feel for Mac OS X. Although previous versions of this look and feel are found incomplete, Swing in Java SE 6 addresses this problem by using more native GUI drawing routines of the underlying systems. Additionally, third-party toolkits such as wx4j or SWT may be used to improve compatibility with native windowing.
Today, not only does Java permeate the Internet, but it is also the invisible force behind many of the apps and gadgets that drive our daily lives. Java is everywhere, ranging from mobile phones to portable models, gaming and navigation systems to business solutions.