Friday, August 29, 2008

Netbeans6.1 Plugin - Use System Desktop

This plugin taps into the potential of java.awt.Desktop and allows users to open/edit, view in browser and send by mail the selected node. the caveats are as follows.

1. Behaviour is not guaranteed to be as expected. For example browse and open can do the same thing - open in the default editor. My testing has shown that only html and xml files open properly in browser.
2. Mail - Selected file is not intriduced as an attachment since the mailto protocol does not support attachments.
3. There are no options to set. What ever is set on the operating system will be used.
4. When file association are not set; For example for file there might not be a file association. In these case you get an IOException which is shown to the user.
5. Works with Netbeans 6.1 and JDK6 only
6. Tested Platforms - Netbeans 6.1 and JDK6 Update 10 on Windows XP
7. BIG NOTE: If an application is not associated with the given file. it does not bring up the "Open With" dialog

Screen Shots

Note: This plugin is not supported for NB with Java 5
if installed with Java 5, then you see an empty menu under Tools-->Desktop

The plugin is now available from within the Plugin manager.


Sunshine said...

Using Netbeans 6.1 with JDK 1.6 your module throwg an exception on startup. There should be an easy way to disable your module or you should provide a fix so that this does not occur.

Sunshine said...

My mistake. I meant jdk 1.5. I apologize