Home > DeveloperSection > Articles > J2SE 1.2: Codename Playground

J2SE 1.2: Codename Playground


Java Java  API(s)  Software Development 
Ratings:
0 Comment(s)
 193  View(s)
Rate this:

J2SE 1.2: Codename Playground



The next milestone for Java came in 8th December 1998. This version had:

·         1,520 classes

·         59 packages

We can clearly see how fast Java grew in just three years. During this time, Sun also introduced a new terminology to describe Java technology—Java SE (Standard Edition). The name JDK is still used to describe an implementation of this technology.

The Introduction of Swing

The major feature introduced in Java 2 was Swing—the new Java-based GUI classes. This made the earlier AWT classes somewhat obsolete, except that Swing extended those classes. AWT components are considered heavyweight because they use many native operating system calls. The new Swing-based GUI classes are totally Java based and therefore are lightweight. These Java based classes provided the advantage of on-demand installation in browsers that refused to add support to the new JDK versions; this was the case with Microsoft’s Internet Explorer (readers may be aware of the famous legal suit between Microsoft and Sun Microsystems during this period). Swing classes also permitted the “pluggable look and feel” (PLAF) that allowed developers to change the look and feel of their applications to whatever they would like. Swing supported Windows, Motif, and Java native platforms.

The 2D API

The JDK now included classes for the 2D API to allow the user to create two-dimensional charts and graphs easily with the help of several predefined classes and interfaces. The 2D API is the basis for all the drawing in the Java SE platform, not just for charts and graphs.

Drag-and-Drop

J2SE 1.2 introduced the drag-and-drop facility for selecting contents in a Java application and then dragging and dropping them into a native application, and vice versa. Thus, we could now drag and drop the contents of a Microsoft Word document into a Java application, as well as the other way around. This is done without copying and pasting the contents to a clipboard.

Audio Enhancements

The JDK now provided classes for playing back MIDI files and a full range of .wav, .aiff, and .au files. It also provided much higher sound quality.

Java IDL

Java IDL is CORBA’S ORB (Object Request Broker) implemented on the Java platform. This facilitated integration of Java applications with existing CORBA clients and servers. Java provided both CORBA IDL (Interface Definition Language) to Java Interfaces mapping and Java to CORBA IDL reverse mapping. This made it possible to protect the investments in both existing Java Client and RMI-based Java applications.

Security Enhancements

Java security is now policy based. Digital signing was introduced in JDK 1.1. This allowed the identification of the applet source; however, it was not possible to assign different privileges, depending on the source of the applet. In other words, there was no differentiation between two different trusted applets or between a trusted applet and a stand-alone application. All would acquire the same privileges. J2SE 1.2 resolved this issue by creating policy-based security. One can now define a security policy based on the source of the applet. In this way, different applets would be subject to different policies defined by their user and thus acquire different sets of privileges. This also applies to stand-alone Java applications that were also subject to user-defined policies. The policy files are text based and easily configurable. Java also provided a policy tool to create and maintain policies. The policies enabled the fine-grain access control to system resources.

Other Enhancements

In addition to the aforementioned major changes, several enhancements were made to improve performance in general. The loaded classes now had better memory compression. The memory allocation and garbage collection had improved algorithms for faster allocations and deallocations. The Just-in-Time (JIT) compiler mentioned earlier was introduced in this version of Java. New classes such as ArrayList and BufferedImage and APIs such as Collections were added. DSA code signing was also added.


Don't want to miss updates? Please click the below button!

Follow MindStick