Introduction
Java is one of the most popular general-purpose, object-oriented, Platform independant Programming Language, a compiled Java program written in Java can be run on any machine that has a Java Virtual Machine installed.
Java is very popular throughout the Software industry, mainly because it has a good Memory Safety feature. Many SAAS companies use Java as their main backend engine, such as Salesforce and ServiceNow, and it is also used by Service Companies to build custom applications like Banking systems and other critical systems like healthcare and other business sectors due to the fact that applications written in Java are highly maintainable and extensible.
Java is also used heavily for mobile application development; one of the largest mobile development application ecosystems, the Android platform, uses Java heavily.
Java is used for building highly scalable applications like Apache Kafka and Apache Hadoop.
Java is also used in Cloud services; AWS and Google Cloud use Java heavily for their internal applications, which run their cloud management system.
So Java is highly relevant in every area of the Software Industry
History of Java
Java was developed by James Gosling at Sun Microsystems.
The development of Java began in 1991 at Sun Microsystems. The interesting part of Java is that it was mainly developed for TV and Electronic systems, but today it ends up dominating the Internet and the software industry.
Devices like TVs and set-top boxes had different hardware, so Java had a clear motive to be portable so that it could run on every device.
Java’s initial name was Oak, but it was renamed to Java due to trademark issues.
The initial system, which was called OAK, was developed in only 18 months, but this language was used only by devices like TVs and set-top boxes.
But some interesting things happened with OAK, which forced Sun Microsystems to shift Java’s focus to Web development
The original plan of Sun Microsystems, OAK for devices, failed due to various facts like market was not ready for the OAK, and the hardware vendor did not adopt it.
At the same time, the Internet era was emerging at a rapid speed, Mosaic and Netscape were making people crazy, and people were witnessing the magic of the Internet
But the Internet had only static websites in the beginning, and the need for server interaction was majorly needed. In that era, popular languages were C and C++, but they were not platform-independent, and the development and maintenance of the Web applications in these languages were not smooth. Java (Then OAK) saw a great opportunity in this gap.
In 1995, Java was launched for web development, and OAK was renamed to Java. But OAK was launched for selling to vendors, and it was built to make money, but Java was free for developers, though Sun Microsystems did not make any direct money from Java, but they were able to make money by providing support for the language for big companies. Support will be like JVM tuning, certified patches and updates, Big companies’ preferred certified components, and Sun made a good amount of money here.
Java’s Servlet became very popular for web development, and then Java continued bringing specific frameworks like JSP, Spring, and Struts.
Developers and companies kept adapting Java, and the Java ecosystem kept becoming mature over the decades, but in 2010, Oracle acquired Sun Microsystems, and the rights of Java automatically got transferred to Oracle, and then Oracle started making some efforts to monetize Java, not directly but indirectly.
In 2018, Oracle made its Oracle JDK paid; this move caused chaos in the software industry, and there was confusion about whether Java is free or paid.
Banks and other big corporations started purchasing licenses for paid JDK, but many companies moved to Open JDK, which was the official open source implementation of Java
Oracle’s paid JDK created chaos between Google and Oracle as well. Oracle started a legal fight against Google, saying Android is using Oracle’s Java in the wrong way, but Google eventually won the case because Android APIs were built on Dalvik, on their own custom runtime
Main Features of Java
Platform Independent
Java is platform independent; it implemented the Write Once, Run Anywhere(WORA) concept at the largest scale possible. Let’s try to understand how this feature helps developers in the real world of Software Development.
When Java came into the market, C and C++ were popular, but they were not platform independent; programmers needed to compile on every different machine they tried to run those applications.
For Example: Assume that in a Company developers using Windows for development (Workstation OS is Windows), and they are creating a web application in C++ the server where they are deploying this applicaition also runs on a Windows server, then no change is needed mostly and they can deploy and run the application mostly as it is, now Company decide to change server OS from Windows to Linux, and now complications starts, If they change their OS on which development is going on (Workstation OS) to Linux then they can deploy appliation as it is, but changing entire development system overnight is not easy but if they change it to Linux then it will be less complicated but when company decide not to change developers OS because windows app eco system is more stronger, then problem arises.
Every change in a Web Application requires a developer to recompile the application on a Linux system, which is their current server.
Java solved this problem; Java does not compile code to native machine code. The Java team decided that they would create a run-time system which will be implemented separately for each platform, like Linux, Windows, and once companies deploy that run time, Java compiled code, which is called byte code, will be executed by that run time, and this run time is called the Java Virtual Machine (JVM)
Memory Safety
Java has one of the finest automatic garbage collections in the world of Software.
Garbage collector in Java automatically tracks and frees memory that is not needed and saves from memory leaks.
Multi Threading
Java provides robust multi-threading in which multiple threads can be run concurrently, allowing developers to create highly scalable applications.
Java Multi-Threading is a part of Java since version 1, but it has kept getting mature since version 1.
Good Ecosystem for Networking
Java provides top-class network handling libraries that can help developers to make network applications faster. Networking is one of the time-consuming tasks in software development, and automating core networking saves developers’ time for development and debugging from possible errors.
Overall, Java has many features that made it one of the most popular and dominating programming languages in the world.
DeepSystemStuff (DSS) is not a normal Blog
Be with DSS, you will get frequent system updates on Linux Kernel, Garbage Collectors, code implementation experiments, DBMS internals from our Chief Author, Nadeem Shaikh, who has achieved 1 million Quora views in 6 months and 6 million distribution of his answers. See his Quora Profile here