Java is also an evolving language that has features of other languages.
When dealing with the design of new programming languages or language extensions, other programming language constructs are often tested for their suitability and then incorporated into the concept if successful. Let’s see how Java compares to other programming languages.
Syntactically, Java is strongly based on C(++), for example, with the data types, operators, or parentheses, but hasn’t adopted all the properties of C(++). In the historical chain, Java is often considered the successor to C++ (and the predecessor of C#), but the Java programming language deliberately avoids problematic constructs such as pointers.
The class concept—and thus the OO approach—was significantly inspired by Simula and Smalltalk. The interfaces that provide an elegant means of class organization are based on Objective-C, where they are referred to as protocols. While Smalltalk manages all objects dynamically and while, in C++, the compiler combines everything into one big binary chunk, in Java, each type is a separate class file. All classes—optionally also from another computer via the network—are loaded by the JVM at runtime. Even method calls are possible via the network.
In summary, Java adopts known and proven concepts, and the language is certainly not a revolution; modern scripting languages are further along in this respect and also adopt concepts from functional programming languages.
You should use the name “Java” with care. Not everything that has Java in its root word actually has to do with Java: JavaScript doesn’t have much in common with Java, except for some similarities in imperative concepts. The JavaScript programming language was developed in 1995 by Netscape developer Brendan Eich. In 1997, the European Computer Manufacturers Association (ECMA) codified parts of JavaScript in the ECMA-262 standard and named the programming language ECMAScript. The current version is ECMAScript 2020. Popular browser vendors Google (Chrome), Microsoft (Edge), and Mozilla Foundation (Firefox) implement ECMAScript, but usually add extensions.
Java and JavaScript differ in many ways, just as keyholes and keystrokes have little to do with each other. The class usage is completely different with its prototype approach in JavaScript than in Java, and JavaScript can also be counted among the functional programming languages, which Java truly isn’t.
In the early days, Microsoft created some buzz around Java. With Visual J++, Microsoft provided its own Java compiler early on (as part of the Microsoft Development Kit) and its own fast runtime environment with the Microsoft Java Virtual Machine (MSJVM). The only problem was that things like RMI and Java Native Interface (JNI) were intentionally missing—JNI was added in 1998. Against all standards, the J++ compiler introduced new keywords such as multicast and delegate. Microsoft also added some new methods and features, for example, J/Direct, to give the platform-independent programming language the Windows brand. With J/Direct, programmers could access functions of the Win32 API directly from Java and thus program pure Windows programs in Java. By integrating DirectX, the internet programming language Java was made multimedia capable, which, of course, led to the problem that applications built with J++ didn’t necessarily run on other platforms. So, Sun sued Microsoft.
Since Sun hadn’t been doing particularly well financially, Microsoft pumped a whopping $1.6 billion into the company in April 2004. Microsoft thus bought the end of antitrust problems and patent disputes. In January 2004, Microsoft stopped working on J++ because energy was flowing into the .NET framework and .NET languages. In the beginning, a Java version, J#, ran Java programs on the Microsoft .NET runtime environment CLR, but in early 2007, J# was also discontinued.
For a long time, Microsoft had almost completely withdrawn from Java development.
Only rather small projects were pursued like the Microsoft JDBC Driver for SQL Server. But support for Java has become broad again: Microsoft has joined the Jakarta EE Working Group, supports Java applications in Microsoft Azure, a cloud computing service, and also provides an OpenJDK-based runtime environment. Perhaps Microsoft will congratulate Oracle at some point, just as it congratulated Linux on its 20th birthday.
Since C# appeared shortly after Java and after a dispute between Microsoft and Sun, and the languages were syntactically similar at the beginning, you might assume that Java was the godfather for the C# programming language. But that was a long time ago. Meanwhile, C# has developed such strong momentum that Microsoft’s programming language is much more innovative than Java. C# has become complex over the years, and Microsoft integrates elements into the programming language without much of a voting process, whereas, in the Java world, a gazillion people discuss and vote. At times, you might have the impression that Java can finally do what C# offers. From this point of view, Java today benefits from the experience gained in the C# world. The addition of lambda expressions to Java 8 also explicitly emphasized the adoption of C# syntax, unlike the Microsoft documentation, which denies any similarity between C# and Java.
Oracle divides Java into the Java Platform, Standard Edition (Java SE) for “general” programs and Jakarta EE—formerly Java Platform, Enterprise Edition (Java EE)—as an extension for “large” enterprise systems. In contrast, Microsoft puts everything into a single framework called .NET. Bigger than the Java framework, .NET can be used to program anything Windows can come up with. This feature is particularly noticeable in the GUI area, where the platform-independent Java has less to offer.
The current direction is .NET Core, an open-source alternative based on the “big” .NET framework, available for Windows, macOS, and Linux x64. All changes to the codebase can be reviewed at https://github.com/dotnet/core. Because existing .NET applications can’t be migrated without customization, the adoption of .NET Core is not yet like that of .NET.
Somewhat cynically, note that Java is perhaps only alive because Microsoft has focused exclusively on Windows with .NET, but the world wanted something else. Microsoft waited too long with .NET Core because it didn’t want to strengthen other platforms.
Editor’s note: This post has been adapted from a section of the Java: The Comprehensive Guide by Christian Ullenboom.