JDIC







If you haven’t checked out JDIC (JDesktop Integration Components), please do so. It took me about 2 minutes to get the samples working (in NetBeans 4 of course ;-). The simplest example is given by Joshua Marinacci right here and it looks like this:







import org.jdesktop.jdic.desktop.\*;

import java.net.\*;



public class DesktopTest {

public static void main(String[] args) throws Exception {

          Desktop.browse(new URL(“http://www.yahoo.com/”));

     }

}




… and really only the bold lines are relevant to JDIC. Really simple. The only thing you need is jdic.jar in your CLASSPATH. And it works perfectly on Windows, Linux, Solaris, and MacOS X (tested them all!).



This (and all other JDIC samples – Tray API, (OS-Native) Browser, System File-Types and associations, Application Packager) seems pretty mature and along with the sister java.net JDNC project is very promising for Java on the Desktop. Swing’s ’97 excitement is back!


Author: alexismp

Google Developer Relations in Paris.