Java, SwingWorker, NetBeans and Mac OS X leopard!

March 24th 2009

I turns out NetBeans 6.5 on my Mac (running Leopard) uses Java 1.5, not 1.6 which is necessary for SwingWorker. To get Netbeans using Java 1.6:
Tools => Java Platforms => Add Platform. A new window should appear. Select the Java Standard Edition and 1.6 should be here: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home . Then click next!
To enable 1.6 within your project right click on the project and select "Set Configuration". Select Libraries, and at the top of the window it should say: "Java Platform: JDK 1.5" click on the JDK 1.5 part and you should be able to select 1.6.

Categories: Programming, Java