advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
GoMustang Application
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 5/5 | Rate this item | 1 user has rated this item.
Email this articleEmail this article
 
Take Charge of Desktop Integration with Java SE 6
With the release of the Java Standard Edition 6.0 Beta, Java developers no longer need to contend with clamp-on solutions or Java Native Interface (JNI) to make their applications interact with desktop products and features. These desktop-integration features now are part of the core. 

advertisement
he latest work-in-progress release of Java Standard Edition (Java SE) version 6.0 (code-named Mustang) offers a smorgasbord of improvements that will change how developers deal with security, JMX, OS files, internationalization, and desktop development in their Java applications. (Read Eric Bruno's article "Java SE 6 First Impressions: A Desktop Winner" to learn all the goodies in store.) Sun Microsystems took a very collaborative approach in developing the specification for this release and it shows. By listening to developers via JSR 270 (the umbrella Java Specification Request for the Java SE 6 release) and releasing the entire Java SE 6 source and binaries beginning in early February 2006, Sun has been able to cull quite a buffet of tantalizing new features.


Mustang's desktop-integration capabilities particularly are something many Java developers have been clamoring for in previous releases. These new features bring a lot of fun to Java desktop application development. Those who have developed Java applications that required interaction with desktop products and features such as Internet Explorer, system tray, and mail clients had to contend with clamp-on contraptions such as JTray and SysTray or venture into the hard-hat area of Java Native Interface (JNI). While this patchwork of solutions served its purpose, any developer with an eye for elegance wanted these features to be part of the core Java platform.

This article steps through the creation of an application called GoMustang that launches with a splash screen and then becomes available on the system tray for one-click browser access to DevX.com. Along the way, it demonstrates how to use Java SE 6 to show a splash screen when an application launches, how to create a system tray icon, and how to launch the native desktop Internet browser from within Java.

What You Need
Java Standard Edition 6 Beta
Apache Ant 1.6.5

Get Your Own Horse

First, download the Java SE 6 Beta from Sun's Java Web site. As of March 1, Java SE 6 Beta-b59 was the as-stable-as-it-can-be-for-now version. While Sun has set a target date of Fall 2006 for final release and some features are subject to change based on the recommendations of the JSR 270 Expert Group, it's not too early to take Mustang for a ride (pun intended) in your desktop development.

The features described in this article should not change much, so you may want to get the most recent downloads of the JDK, JRE, and documentation. For the more adventurous types, snapshot downloads also are available.

Before you moving on, ensure that your desktop platform is supported. I developed and tested the application on Windows XP with no problems.

Once downloaded, go through the regular drill and install both the JDK and JRE. The installation defaults to the JDK and JRE install directories at c:\program files\java\jdk1.6.0 and c:\program files\java\jre1.6.0, respectively. For sake of simplicity, stick to the default installation settings.

Make sure your computer's Environment Variables in the Windows System Properties are pointing to the Java SE 6.0 JDK. I had JAVA_HOME Environment Variable JAVA_HOME= C:\Program Files\Java\jdk1.6.0.

Once you have your installation complete, check the version of the Java JRE. You should receive a message that indicates 1.6.0-beta, as follows:


C:\java\mustang> java -version
java version "1.6.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-beta-b59g)
Java HotSpot(TM) Client VM (build 1.6.0-beta-b59g, mixed mode, sharing)

  Next Page: Ant Before the Horse


Page 1: IntroductionPage 3: Launch a Splash Screen
Page 2: Ant Before the HorsePage 4: System Tray Icons
Untitled
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES