Java SE 6 First Impressions: A Desktop Winner

Java SE 6 First Impressions: A Desktop Winner

he recently released Java Standard Edition 6 (Java SE 6, a.k.a. Mustang) beta is feature complete and stable enough for mainstream evaluation. I downloaded and test drove the release in its first week of availability and came away particularly impressed with the new desktop features. Besides sporting the new naming convention for all Java platforms (the “2” has been dropped), it has been improved with many new features that are worth exploring. The improvements can be broken down into two categories: desktop and core.

The desktop improvements focus mainly on user interface (UI) performance and native OS desktop integration. The core improvements focus mainly on improving developer productivity and Java application management. Sun’s Mustang team also put significant effort towards Web services support and security improvements.

Overall, whether you’re an application developer, a system administrator, a tool vendor, or a security expert, Java SE 6 has something for you. This article presents some of the interesting new features I used in some more detail.

Core Features and Improvements

The Java core can be described as portions of Java (the language and its tools) that are fundamental to all other aspects of Java, from user interface APIs to server libraries. I describe the improvements to the Java core in Java SE 6 here, broken down by sub-category.

Developer Productivity

The new Java Compiler API allows Java source to be compiled from within a Java application. During compilation, the application has access to the library dependency information as formulated, along with any warnings, errors, and other messages that are generated. Although this feature did not seem like something I would use often, I quickly found new uses for it. For instance, I used it to quickly build the data-access layer for an application I had been building. The code I wrote generated and compiled the classes used to access the application’s database tables. The end result was a JAR file that was generated, built, and deployed as part of the system’s Ant scripts. The fact that the classes are compiled from within the application makes the code generation interactive?I can modify and build the classes iteratively.

To enable Java scripting, Java SE 6 supports JSR 223, a scripting framework that provides scripting language access to Java internals. You can locate scripting engines and invoke them to run scripts at runtime. The Scripting API allows you to provide Java support for the scripting language of your choice. In addition, the Web Scripting Framework allows script code to generate Web content within any Servlet container.

For debugging, the Java Platform Debugger (JPDA) has been enhanced to detect deadlocks and generate stack traces for monitor objects that are locked. In addition, Java SE 6 adds support to allow agents to attach to a running JVM for diagnostic purposes.

Application Management

Java SE 6 enhances memory leak analysis and detection by including a full stack trace in the java.lang.OutOfMemory exception and generating a fatal error log when the heap is full. In addition, a new JVM option allows you to run a script when the heap is full.

Improvements to the JMX Monitoring API allow an application to send events when MBean attribute values (including those within complex types) pass specified thresholds.

For Solaris 10 users, the Hotspot JVM for Solaris provides hooks for the Solaris DTrace system debugging utility to track and display internal JVM activities, such as garbage collections, class loading, threads, locks, and so on. I was given a demo of this feature first-hand at JavaOne and was very impressed by the depth of debugging the DTrace system provides. As an application runs, DTrace allows you to stop the code anywhere, view all of the libraries loaded (not just the Java libraries, but all system libraries), and step right into the Solaris kernel?down to the hardware. Java’s new support for this amazing tool makes available the world of system debugging. I can recall some times in the past when I received Solaris Signal-8 errors in the JVM; this feature would have saved me a lot of guessing.

Web Services

Java SE 6 includes a few APIs to support Web services. The XML Digital Signatures API allows you to secure Java-based Web services by performing cryptographic operations on XML data. The Java-XML Web Service (JAX-WS) 2.0 API updates the library formerly named JAX-RPC. Improvements to Java-XML Binding (JAXB) 2.0 include XML schema support and class binding to a schema. Lastly, the Streaming API for XML (STaX) provides a bi-directional API to read and write XML via a stream of events, including the ability to skip sections, and focus on sub-sections of documents.

Security

Java SE 6’s security offerings include GSS/Kerberos integration, Java Authentication and Authorization Service (JAAS) for LDAP authentication, and a security certificate request framework that allows Java applications to request secure certificates over a number of protocols.

Desktop Features and Improvements

Java has long been regarded as an excellent language for server-based software, but as second-rate for desktop GUI applications. The Java desktop team at Sun has been working to change this perception by integrating Java more closely with the host system it runs on. The result is not only improved GUI performance in Java SE 6, but also improvements in the behavior of Java GUI applications.

Many of the new desktop features in Java SE 6 are based on the JDesktop Integration Components (JDIC) project. The JDIC project gives Java applications access to features available on the native OS desktop, such as the browser, email editor, file-type associations, the system tray, application launching, and printing. The following are some of the more prominent Java desktop improvements in Java SE 6:

  • Splash screen support?Splash screens inform a user that an application is starting while he waits. Java SE 6 adds support for splash screens that can be displayed even before the JVM starts.
  • Java Foundation Classes (JFC) and Swing Improvements:
    • Java SE 6 leverages Windows APIs to both improve performance and ensure the Windows look-and-feel on current and future versions of Windows.
    • It improves layout management to include customizable layout managers and includes other enhancements to simplify GUI component layout.
    • It has vastly improved Swing drag-and-drop, making it customizable.
    • True double-buffering provides quick, smooth graphic transitions.
  • System Tray Support?Two new classes, SystemTray and TrayIcon, in the java.awt package allow you to add icons, tool tips, and pop-up menus to the Windows or Gnome Linux system tray. The system tray is the desktop area shared by all applications, usually located in the lower-right corner. Actions and events allow your Java application to track mouse clicks on the items you place in the tray, and respond to those clicks. I have found this feature useful for my server applications as well. For instance, used with the Desktop API (see below), I now add an icon to the system tray to easily launch a browser for the application’s administrative HTML page. Regardless of OS (Linux or Windows), I no longer need to recall the application’s administrative port or URL?simply click the icon and the page appears.
  • Improved print support for JTable
  • Java 2D enhancements?Improvements have been made to text display quality, especially on LCD monitors. Integration with the host desktop’s font anti-aliasing settings ensures consistent text rendering.
  • The new java.awt.Desktop API?The new Java SE 6 Desktop package aims to make Java UI applications “first-class citizens.” With this package, Java applications can launch the default browser and email client, and integrate with common desktop applications (such as OpenOffice) to open, edit, and print files of specific types. The Desktop package offers this ability through action events (Desktop.Action) that you can integrate into your applications.
  • Internationalization?Java SE 6 supports “plugability” for some locale-specific features, such as date formatting, Unicode text normalization, and resource bundles.

A Java Desktop Revolution

While Java SE 6 provides too many individual feature additions, improvements, and bug fixes to be listed here, this article provides a roadmap to this upcoming, important, Java release. The improvements span so many aspects of the standard edition of Java that all stakeholders will be affected, including those intimate with Java Enterprise Edition.

Java SE 6 has the potential to be as revolutionary to the desktop as Java 2 was to the server. It’s best to be prepared for this storm now, and position yourself to cash in on the potential rewards available to the early adopters.

devx-admin

devx-admin

Share the Post:
USA Companies

Top Software Development Companies in USA

Navigating the tech landscape to find the right partner is crucial yet challenging. This article offers a comparative glimpse into the top software development companies

Software Development

Top Software Development Companies

Looking for the best in software development? Our list of Top Software Development Companies is your gateway to finding the right tech partner. Dive in

India Web Development

Top Web Development Companies in India

In the digital race, the right web development partner is your winning edge. Dive into our curated list of top web development companies in India,

USA Web Development

Top Web Development Companies in USA

Looking for the best web development companies in the USA? We’ve got you covered! Check out our top 10 picks to find the right partner

Clean Energy Adoption

Inside Michigan’s Clean Energy Revolution

Democratic state legislators in Michigan continue to discuss and debate clean energy legislation in the hopes of establishing a comprehensive clean energy strategy for the

Chips Act Revolution

European Chips Act: What is it?

In response to the intensifying worldwide technology competition, Europe has unveiled the long-awaited European Chips Act. This daring legislative proposal aims to fortify Europe’s semiconductor

USA Companies

Top Software Development Companies in USA

Navigating the tech landscape to find the right partner is crucial yet challenging. This article offers a comparative glimpse into the top software development companies in the USA. Through a

Software Development

Top Software Development Companies

Looking for the best in software development? Our list of Top Software Development Companies is your gateway to finding the right tech partner. Dive in and explore the leaders in

India Web Development

Top Web Development Companies in India

In the digital race, the right web development partner is your winning edge. Dive into our curated list of top web development companies in India, and kickstart your journey to

USA Web Development

Top Web Development Companies in USA

Looking for the best web development companies in the USA? We’ve got you covered! Check out our top 10 picks to find the right partner for your online project. Your

Clean Energy Adoption

Inside Michigan’s Clean Energy Revolution

Democratic state legislators in Michigan continue to discuss and debate clean energy legislation in the hopes of establishing a comprehensive clean energy strategy for the state. A Senate committee meeting

Chips Act Revolution

European Chips Act: What is it?

In response to the intensifying worldwide technology competition, Europe has unveiled the long-awaited European Chips Act. This daring legislative proposal aims to fortify Europe’s semiconductor supply chain and enhance its

Revolutionized Low-Code

You Should Use Low-Code Platforms for Apps

As the demand for rapid software development increases, low-code platforms have emerged as a popular choice among developers for their ability to build applications with minimal coding. These platforms not

Cybersecurity Strategy

Five Powerful Strategies to Bolster Your Cybersecurity

In today’s increasingly digital landscape, businesses of all sizes must prioritize cyber security measures to defend against potential dangers. Cyber security professionals suggest five simple technological strategies to help companies

Global Layoffs

Tech Layoffs Are Getting Worse Globally

Since the start of 2023, the global technology sector has experienced a significant rise in layoffs, with over 236,000 workers being let go by 1,019 tech firms, as per data

Huawei Electric Dazzle

Huawei Dazzles with Electric Vehicles and Wireless Earbuds

During a prominent unveiling event, Huawei, the Chinese telecommunications powerhouse, kept quiet about its enigmatic new 5G phone and alleged cutting-edge chip development. Instead, Huawei astounded the audience by presenting

Cybersecurity Banking Revolution

Digital Banking Needs Cybersecurity

The banking, financial, and insurance (BFSI) sectors are pioneers in digital transformation, using web applications and application programming interfaces (APIs) to provide seamless services to customers around the world. Rising

FinTech Leadership

Terry Clune’s Fintech Empire

Over the past 30 years, Terry Clune has built a remarkable business empire, with CluneTech at the helm. The CEO and Founder has successfully created eight fintech firms, attracting renowned

The Role Of AI Within A Web Design Agency?

In the digital age, the role of Artificial Intelligence (AI) in web design is rapidly evolving, transitioning from a futuristic concept to practical tools used in design, coding, content writing

Generative AI Revolution

Is Generative AI the Next Internet?

The increasing demand for Generative AI models has led to a surge in its adoption across diverse sectors, with healthcare, automotive, and financial services being among the top beneficiaries. These

Microsoft Laptop

The New Surface Laptop Studio 2 Is Nuts

The Surface Laptop Studio 2 is a dynamic and robust all-in-one laptop designed for creators and professionals alike. It features a 14.4″ touchscreen and a cutting-edge design that is over

5G Innovations

GPU-Accelerated 5G in Japan

NTT DOCOMO, a global telecommunications giant, is set to break new ground in the industry as it prepares to launch a GPU-accelerated 5G network in Japan. This innovative approach will

AI Ethics

AI Journalism: Balancing Integrity and Innovation

An op-ed, produced using Microsoft’s Bing Chat AI software, recently appeared in the St. Louis Post-Dispatch, discussing the potential concerns surrounding the employment of artificial intelligence (AI) in journalism. These

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this autumn sale has already created

Cisco Splunk Deal

Cisco Splunk Deal Sparks Tech Acquisition Frenzy

Cisco’s recent massive purchase of Splunk, an AI-powered cybersecurity firm, for $28 billion signals a potential boost in tech deals after a year of subdued mergers and acquisitions in the

Iran Drone Expansion

Iran’s Jet-Propelled Drone Reshapes Power Balance

Iran has recently unveiled a jet-propelled variant of its Shahed series drone, marking a significant advancement in the nation’s drone technology. The new drone is poised to reshape the regional

Solar Geoengineering

Did the Overshoot Commission Shoot Down Geoengineering?

The Overshoot Commission has recently released a comprehensive report that discusses the controversial topic of Solar Geoengineering, also known as Solar Radiation Modification (SRM). The Commission’s primary objective is to

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing pandemic. This major investment, which

Revolutionary SABERS Transforming

SABERS Batteries Transforming Industries

Scientists John Connell and Yi Lin from NASA’s Solid-state Architecture Batteries for Enhanced Rechargeability and Safety (SABERS) project are working on experimental solid-state battery packs that could dramatically change the

Build a Website

How Much Does It Cost to Build a Website?

Are you wondering how much it costs to build a website? The approximated cost is based on several factors, including which add-ons and platforms you choose. For example, a self-hosted