The Source for Java Technology Collaboration
User: Password:



George Zhang's Blog

Community: JavaDesktop Archives


JDIC@JavaOne 2005 and Deeper Desktop/Java Integration

Posted by georgez on July 25, 2005 at 02:58 AM | Permalink | Comments (6)

This blog gives my late report of JavaOne 2005, basically staffing the JDIC show, and an exploration of missing features in the desktop/Java integration territory, the focus of the JDIC project. Bridging such gaps would backup Java at the center of client-side development. 

A Recap of JDIC@JavaOne 2005 

It's my second time attending JavaOne and the first time to be a speaker (of the JDIC BOF session). I was more excited about this JavaOne, because of all sorts of cool stuff and most importantly, meeting with many friends and JDIC participants after a long time email communication.

JavaOne 2005 is a yearlong milestone of JDIC, since its inception at JavaOne 2004. This year, we hosted a BOF session and a booth. The BOF session was well attended, with nearly 100 audiences, despite 15 BOFs going on at the same time. It went on with a 30 minutes presentation (slides), followed by a 20 minutes engaged discussion.

In the pavilion area, a middle-sized visitors dropped by the JDIC booth. I spent most of my time in the booth answering questions, showing off demos, and it's quite rewarding to get new ideas. Though, I would very much like to spend more time on those sessions.: )

A couple of bugs were brought to us, most of them relating to the Browser component, including:

  • Session management with multiple pop-up browser windows
    This was fixed someway but we need a legal confirmation from the contributor.
  • Using the Browser component (an AWT component) in a Swing application causes some issues.
    Browser as an AWT component comes from its implementation, which paints a native embedded browser window to a JAWT parent window. Allowing mixing of heavy and lightweight components is a known issue (Bug 4811096) in JDK. Hopefully, it can be resolved within JDK.
  • Browser support on Linux/Unix platforms
    As Browser only supports embedding Mozilla on Linux/Unix, if Mozilla is not available, it fails. On Windows platforms, we are falling back to Internet Explorer if Mozilla is not the default browser. We've got in tough with NetBeans that, we may be able to make a NetBeans provided Browser component a backup if no Mozilla available. Though it needs more communication.

A list of new proposed features at the conference, with a few comments from my perspective:

  • Java API to invoke native input system
  • Java API to control native application windows
  • Embed MS Office Excel or StarOffice
    This is just like the Browser component embedding a native browser. Embedding MS Office Excel wouldn't be cross-platformed, as Excel is not available on Unix/Linux. Embedding StarOffice can be a better alternative. Though, it depends on StarOffice, and we need to identify what specific functionalities are needed.
  • Access to Windows Registry
    JDIC Filetypes API (package org.jdesktop.jdic.filetypes) resolves this problem in a cross-platform way. Though it's not as flexible as the Windows Registry API, it's cross-platformed, and provides pretty much the functionality needed by most applications.
  • Access to network parameters
    Though this feature fits nicely into the JDIC SystemInfo incubator project, it's approved for inclusion in Mustang (See bug 4691932). So we won't do that within JDIC.

Some more general questions about the project were raised, including the platform support matrix, stability, JDK integration, etc, which were covered in the JDIC website. In short, JDIC got more visibility both in the community and among JDK teams, and we introduced it to many new users this year.

Features on the road

Right after JavaOne, some new features are being added to the project or under investigation:

  • Most Recently Used document API
    This small feature adds a specified file to the Most Recently Used (MRU) list of documents, which are shown in the Start Menu of Windows platforms or Gnome/KDE desktops. To see how this API is useful, run the JFC demo Notepad bundled with JDK, the opened/edited files are not added to the MRU list of documents. This API provides such functionality in Java. It's to be included in the JDIC FileUtil incubator project. See the discussion thread for the API specification.
  • Music Player Control API
    This incubator project provides a set of Java APIs to control native music players, e.g. Winamp, Rhytmbox, iTunes, etc. So, you can control your favorite music player to listen to music without ever leaving your Java application. See the project homepage for more information.
  • Browser component support on Mac (embedding Safari)
    This has been under active development by Christopher Atlan, with a few issues to reconstruct the implementation to make it an AWT Canvas component. See issue#222 for updates.
  • Browser plug-in container
    The first goal of this container is to provide a way to embed these plug-ins into Java applications through NPAPI, so developers could make use of these content viewers in their Java applications.

    The second goal is to use it to resolve the C++/ABI problem we have with the JDIC Browser component embedding Mozilla on Linux/Unix, as it has native C++ code and needs to work with a standalone Mozilla instance. We can wrap the Mozilla browser as a NPAPI plug-in, so the external interfaces will be NPAPI/C based, and then embed it into Java through the browser plug-in container feature.
Some guidelines for incoming features

Besides the features under working, we've got lots of feature requests on the plate, and more are coming everyday. Below are some suggested guidelines we accept or host new features in JDIC later on:

  • Base on the votes and prioritization of feature requests through Issue Tracker
    Later on, all the feature requests should go to Issue Tracker, and be tracked there. There are vote and prioritization fields, just like the JDK RFE reports. If you want to see a feature in JDIC, you can vote on it or increate its prioritization with justification.

Many features are addressed by more and more incubator projects, each of them providing a set of relevant APIs. We filter those more desirable features to be hosted in JDIC from three perspectives: desktop/Java integration, cross-platform and availability in JDK. Those features on desktop/Java integration, having a cross-platform support and missing in JDK would have a higher priority, and a better chance to be hosted in JDIC.

  • Align with JDK (Mustang, Dolphin) development
    Though we are not doing the project specifically for JDK, JDIC has many intersections with JDK. We can align the work to avoid duplicate. While we introduce new features into JDIC, we can first access the Java technology Bug Database, to see if similar features were already registered, planned or developed for JDK. Then we can communicate with JDK teams to see if there is an alignment. Some JDIC features were also registered to or planned for JDK, including the JDIC Tray Icon API integrated in Mustang b39 (Bug 4310333), and JDIC Desktop API to be integrated into a later Mustang build (Bug 6255196).

    On the other hand, Mustang won't be available until mid of next year. Despite lots of new features introduced in Mustang, there are many bugs around desktop/Java integration registered in the Bug Database, which fit into JDIC. If we work on such features, then would benefit the Java community more and have a better chance to be accepted as part of JDK someday.

More on desktop/Java integration

Besides JDIC, there are many relevant work or requirements out in the community. Read Colm Smith's blog Java and Desktop/Platform Integration, which commented on a couple of desktop/Java integration projects. It covers an interesting Java Service Wrapper project to enable a Java application to run a system service.

Another blog Why I can't get excited about JDIC by Elliott Hughes gives a long list of desktop/Java integration features that are missing for Mac, most of which are also missing on Windows/Linux/Unix platforms.

With all the listed feature requests falling into the scope of JDIC, we want your input to prioritize them and work together. Please raise your ideas and vote for your favorite features to the JDIC project !

Last bits ...

Coming to the end of this blog, I read ClientJava.com's interview with the developers behind Columba - Java Email Client, which "... proves that with the new direction Java is going so far, it can leave its bad reputation behind and be a good foundation for a modern desktop applications." That "new direction" means desktop integration. It's worth a read!



JDIC Features in Mustang

Posted by georgez on April 24, 2005 at 09:58 PM | Permalink | Comments (10)

JDIC (JDesktop Integration Components) project incubates many useful desktop features. In the recent months, we have been working closely with the J2SE team to incorporate some of the exciting features from JDIC into the next J2SE release (J2SE 6.0, code named Mustang). Check out the JDIC Inclusion Into J2SE section of my blog Where's JDIC Going? for a briefing of JDIC's feature inclusion into J2SE.

Both the Tray Icon API (org.jdesktop.jdic.tray.*) and Desktop component (org.jdesktop.jdic.desktop.*) will be included in Mustang. These two sets of APIs will be added under the java.awt package. Here are more details: 

  • Feature: API to add a Java application to a system's app-launching panel/toolbar 
    Bug ID: 4310333. This feature started as the JDIC Tray Icon API.

The main functionality of these features in J2SE will be similar to the one in JDIC, although the APIs in these features will be reviewed and revised to ensure they fit nicely with the rest of the J2SE APIs. 

The feature inclusion shows the potential reward in contributing to the JDIC project: if you work on a useful desktop feature within JDIC, one day it may be included in every copy of J2SE!

Questions & Answers

Q: Will you remove those packages from JDIC after the inclusion in Mustang? 
A: We won't do that in the near future. Since there will still be a lot of people using J2SE 1.4 or 1.5, we'll keep them within JDIC, but mention their availability in Mustang and suggest a migration.

Q: If you keep them in JDIC, how will you maintain the code?
A: Afterwards, these features in JDIC will be in maintenance mode.

Q: Where should I report bugs after the Mustang inclusion, J2SE or JDIC?
A: It depends on where you find the bug. Raise it to J2SE through the "normal" bug database if it happens to J2SE, and to JDIC if you are using JDIC releases. If a bug reported to JDIC also happens to J2SE, we'll report it to J2SE as well.

Q: What other JDIC components will be included in later J2SE releases after Mustang?
A: As the next step, we are working closely with the J2SE team to incorporate the JDIC Browser component (package org.jdesktop.jdic.browser) into a future release of J2SE after Mustang.



Where's JDIC Going?

Posted by georgez on March 24, 2005 at 08:41 AM | Permalink | Comments (6)

I've been involved with the JDesktop Integration Components (JDIC) project since inception. Lots of things have been going on since it was open sourced during JavaOne 2004. JDIC community just released a milestone release 0.9, with a couple of new features, API revisions and bug fixes to the earlier 0.8.x releases.

There've been many interesting discussions and ideas in the community that worth noting. What follows is a briefing of what's new in 0.9 and the overall status of the project.

What's New in JDIC 0.9

For a summary of the new features plus a complete list of bug fixes in 0.9 release, see the Release Notes. Below outlines the major APIs and features introduced in 0.9:

  • The Browser Component (package jdic.jdesktop.jdic.browser)
    • public java.lang.String getContent()
    • public void setContent(java.lang.String htmlContent)

      Provides the ability to set and get the HTML content.

    • public java.lang.String executeScript(java.lang.String javaScript)

      Provides the ability of communicating between Java and JavaScript code. Examples:

      WebBrowser webBrowser = new WebBrowser(new URL("http://java.net"));
      ......

      // Set the background color
      webBrowser.executeScript("document.bgColor='blue';");
      // Print the loaded page
      webBrowser.executeScript("window.print();"); 

      The W3C DOM API support was frequently requested. As JDIC Browser takes an out-process approach to support Java applets, implementing the fine-grained W3C DOM API would cause significant performance overhead, so we didn't implement the W3C DOM API. But using this method, JavaScript DOM APIs are all available.
  • The Tray Icon API (package jdic.jdesktop.jdic.tray)
    • public void displayMessage(java.lang.String caption, java.lang.String text, int messageType)
  • Displays a balloon message near the tray icon. The message will disappear after a timeout or if user clicks on it.

  • A cross-platform release
  • Unlike a pure Java project, JDIC involves much native code, as it extends J2SE to bridge the gaps between the J2SE platform and the native desktop. In 0.8.x releases, we provided platform-specific releases (Windows, Linux, and Solaris). As of 0.9, we provided an additional cross-platform release. The developers can deploy applications using JDIC with this single cross-platform release. This greatly benefits pure Java applications, though, it increases the application size slightly.

Mac Support

Up to now, Apple's Mac OS X support has been added to most of JDIC features, though some of them are not yet provided in the 0.9 release. 

  • The Desktop Component (package jdic.jdesktop.jdic.desktop)
    Already supported on Mac OS X in release 0.9.
  • The Browser Component
    Based on Dmitry Markman's work on WebKit & Java integration, Christopher Atlan is working to port JDIC Browser component to Mac OS X. Check out the discussion.
  • The Tray Icon API
    Thomas Kuenneth released the first public preview of the MacTray project, whose goal is to deliver a clean-room implementation of the JDIC Tray Icon API for Mac OS X. Thomas will integrate the code into JDIC after solving some technical issues. Check out the discussion.

Initially, JDIC only had support for Windows, Linux and Solaris platforms. But for later features and APIs, we'll have the Mac OS X support in mind from the early design phase. 

JDIC Inclusion Into J2SE

Because of the popularity of JDIC we're taking a look at integrating parts of it into the "Core", the J2SE platform. This will significantly ease deployment of JDIC apps since all native code required will then be part of J2SE. The JDIC team is proposing to include a couple of JDIC features into J2SE 6.0 (Mustang) or 7.0 (Dophin). JDIC APIs have an advantage of being open source. With the available working prototype, we can see how the community use them, and then revise them accordingly.

We are revising the API specifications per the feedback from the J2SE team and the community for the inclusion:

  • The Browser Component
    Check out the discussion thread for detailed feedback and revisions.
  • The Desktop Component
    Check out the discussion thread for detailed feedback and revisions.
  • The Tray Icon API
    The Tray Icon API will go into J2SE 6.0, with some modifications to the JDIC Tray Icon API.

Your input will help to improve and finalize the API specs, before they are made available to all Java developers. 

JDIC Availability

As an Open Source project, JDIC website is the place to get all the latest information and releases. But in the next major release (Release 3) of Sun's Java Desktop System (JDS) operation system, and Solaris 10, which includes JDS Release 3, JDIC will be installed by default. It will no longer be necessary to install the JDIC Solaris PKG or JDS RPM on those operating systems. 

However, JDIC keeps moving forward, you can visit the project website to reinstall the latest releases.

Take A Look Ahead

JDIC continues to be a popular java.net access, which shows a significant adoption. It holds a set of Java packages and facilities to ease Java/desktop integration, but it's so much more than that. While we enjoy bringing you new releases, don't forget that JDIC is also a place to host incubator projects proposed and owned by developers. Want to bake your own Java/desktop integration API? Hosting it under the cover of JDIC lets your idea be more visible, make use of a common community, and more ...! You can find the incubator projects currently hosted in JDIC. Incubator projects after JDIC was initially launched are as follows:

  • Floating Dock Toplevel Window (package org.jdesktop.jdic.dock):
    A floating dock toplevel window that can be used to develop applications like the Gnome panel or the Windows taskbar.
  • Icon Service (package org.jdesktop.jdic.icon):
    Java API for accessing icons from native icon specifications.
  • SystemInfo (package org.jdesktop.jdic.systeminfo):
    Java API for monitoring system information, including the session idle time, the session locking state, cpu usage, network status, etc.

All these projects fit in the scope of Java/desktop integration. They are owned by the project owners, and developed at their own speed, with the support of JDIC QA engineers to ensure quality.

Besides these things on the plate of JDIC, we've consistently got new proposals and feature requests. Check out this incomplete list of feature requests, none of which is part of J2SE. And there are much more missing. Every now and then, we want to write a slick rich client application in Java that tightly integrates with the underlying desktop, but find that the necessary APIs are missing or incomplete on various platforms, including Windows, Linux, Solaris and Mac at least.

With that in mind, we are collecting requirement information, carefully addressing those most desirable features by engaging the community and aligning the work with 3rd party Open Source projects. We are looking for contributors, either expert individuals or from companies, to help define and build this community!

JDIC Presence at JavaOne 2005

Will you be in San Francisco during JavaOne 2005? The JDIC team will hold a BoF entitled JDesktop Integration Components (JDIC): Desktop Integration for Java Desktop Applications at JavaOne 2005, a presentation followed by an open mike or break out session. This would be an opportunity for project owners, contributors, and observers to meet each other and share our successes, failures, and frustrations of the JDIC project. 

The JDIC team is also applying for a POD in the booth area, to showcase the JDIC features, communicate with you face-to-face. If we make it, there'll be a notice to the project forum. Please drop by the booth and post your ideas or questions to us. The JDIC team looks forward to your input and meeting you at JavaOne 2005. 

More on JDIC

JDIC is far and away not the only resource for Java developers who need desktop integration, it's not yet complete either. But it's under active discussion and development. There are currently several developers submitting code to the core, and a large number of community members submitting patches and suggesting ideas. Changes happen everyday as more and more users want to extend it. Please get involved and post your ideas to the JDIC forum.





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds