<< St. Louis λ-Lounge | Home | Google Chrome: The Three Month Report >>

JavaFX 1.0 On Linux: NetBeans Plugin

[Update (Wed Jun 3 07:45:43 PDT 2009)]: As of June 2, 2009, you can download the Linux and Solaris version of JavaFX 1.2 SDK directly from http://javafx.com. The Linux and Solaris support is preview only.[/]

This is a follow up on my Using JavaFX 1.0 On Linux seven days ago.

That blog entry was picked up by:

A commenter on my blog (and several commenters on the above cited blogs) asked about if the JavaFX NetBeans plugin can be made to work on Linux. Sure it can. It's Java.

However, since the plugin is not officially released for Linux, things are a little bit confusing: If you browse for Available Plugins and search for javafx, you will see three plugins:

  • JavaFX Source Debug
  • JavaFX 1.0
  • JavaFX Weather Sample

but they cannot be installed. The error message reads:

No plugin providing the capability javafx.sdk could be found.

These three are leftovers from the JavaFX Preview SDK release. We do not want them. We need to browse to the NetBeans update center to find the ones we want:

http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx/

It contains 23 *.nbm (Netbeans module) files. Download them all into a directory.

In NetBeans plugin manager, go to the Downloaded tab and click on the Add Plugins... button, and add all the downloaded files. You will see 21 plugins showing up in the window. Now *uncheck* the three JavaFX Preview SDK plugins listed above and install the rest 18. The installation should go normally, prompting you to restart Netbeans.

The two *.nbm files that the NetBeans plugin manager did not show contains the Windows and Mac versions of the JavaFX SDK 1.0. We ignore the Windows file and concentrate on the Mac version. We do a manual installation:

  • Unzip the file (It's a Zip formatted file)
  • This generated a few subdirectories, one of them is netbeans
  • The netbeans directory further contains subdirectories config, javafx-sdk1.0 and modules
  • In your NetBeans 6.5 installation directory, create a subdirectory javafx2 (in parallel to the java2, groovy1 and ruby2 subdirectories) and copy the config, javafs-sdk1.0 and modules directories into javafx2.
  • You may need to go into the javafx-sdk1.0/bin subdirectory and make the scripts there executable.

That's it. You now can create JavaFX projects in NetBeans 6.5, edit, compile, debug and preview the project.

Enjoy!

Or wait for the official Linux release, which is only (I heard it somewhere) weeks away.

(Disclaimer: I know very little about NetBeans modules. Although the above procedure appears to work for me, I'm not sure if there is a shorter way to do all this, or if it will have any negative effects on your NetBeans installation. YMMV.)



Re: JavaFX 1.0 On Linux: NetBeans Plugin

Unfortunately MMV. I had a Null Pointer Exception during installation of the 18 modules, followed by unable to find mac.os module on the restart. Guess I'll have to wait for the formal release.

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Try ignore both error messages and continue on. I think I encountered both but failed to take notes of them.

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Awesome this workaround works! So we Linux-users can also start playing :-) Thanks!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

It works, but when I can't run the project, netbeans output error message: standard-run: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:117) at javax.swing.UIDefaults.getUI(UIDefaults.java:741) at javax.swing.UIManager.getUI(UIManager.java:1012) at javax.swing.JPanel.updateUI(JPanel.java:109) at javax.swing.JPanel.<init>(JPanel.java:69) at javax.swing.JPanel.<init>(JPanel.java:78) at com.sun.javafx.eula.EulaDialog$2.<init>(EulaDialog.java:117) at com.sun.javafx.eula.EulaDialog.getBackgroundPanel(EulaDialog.java:110) at com.sun.javafx.eula.EulaDialog.<init>(EulaDialog.java:137) at com.sun.javafx.eula.EulaDialog$12.run(EulaDialog.java:377) at com.sun.javafx.eula.EulaDialog.askUserAcceptEULA(EulaDialog.java:385) at com.sun.javafx.eula.EulaImpl.askUserAcceptEULA(EulaImpl.java:134) at com.sun.javafx.eula.EulaImpl.show(EulaImpl.java:149) at com.sun.javafx.runtime.provider.AWT_EDT_RuntimeProvider$1.run(AWT_EDT_RuntimeProvider.java:100) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initSystemColorDefaults(GTKLookAndFeel.java:1267) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1509) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.access$000(GTKLookAndFeel.java:37) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel$WeakPCL$1.run(GTKLookAndFeel.java:1449) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) java.lang.NullPointerException at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initSystemColorDefaults(GTKLookAndFeel.java:1267) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1509) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel.access$000(GTKLookAndFeel.java:37) at com.sun.java.swing.plaf.gtk.GTKLookAndFeel$WeakPCL$1.run(GTKLookAndFeel.java:1449) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) I think this is a bug of swing,not netbeans and javafx: https://appframework.dev.java.net/issues/show_bug.cgi?id=26 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6369498 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468089

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Weiqi, you're the man! Thanks for all your work!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

BTW, to eliminate the problems mentioned, (1) make sure the three JavaFX netbeans modules for pre 1.0 in Linux are not installed and there's no javafx2 directory under the netbeans main directory before you begin. (2) Install first the Mac module and then the other 18 modules, as described. (3) Remove the javafx-sdk1.0 directory under javafx2, download the latest version (1.0.1) and save the whole (unzipped) directory with the same name (javafx-sdk1.0) under javafx2 (hence, replace one with the other). At least up to this point, it's working perfectly. Thus, I wonder if the Linux version is not out only because the Solaris version is the one with the problems, and they don't want Linux to eat more of their market. Mmmm!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

How did you "unpack" the javafx SDK 1.0.1 for macosx ? I completely don't know what to do whit that *.dmg file. If i use "file" utility, then it told me that it is bziped. When unbzip it then i got one file and file utility told me that it is just data. I also tried to convert dmg to iso image and again no result......so do anybody know what to do whit it ? Thx in advance

Re: JavaFX 1.0 On Linux: NetBeans Plugin

I found the guideline here.....http://www.weiqigao.com/blog/2008/12/04/using_javafx_1_0_on_linux.html....it is also linked from the links at top of this blog entry. I was blind.....

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Seems to do the trick !! :-) Just ignored the null pointer exceptions. Thanks !!!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Hello, Im following the steps in your post, but its getting the message: Required Modules Missing, and i cant proceed with the installation of the plugins.. some idea? thanks!!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Fantastic work, thanks for letting everyone know! (Readers note Alex Alvarez's Dec 21 comments too)

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Excellent! Alvarez remarks are crucial, read it!

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Thanks for both your tutorials. There should be link from JavaFX official page to your tutorials. Something like - It doesn't work in linux yet, but follow Weiqi's excellent links here..

Re: JavaFX 1.0 On Linux: NetBeans Plugin

This method does not work on JavaFX 1.1. Please goto http://java.dzone.com/tips/javafx-11-linux-netbeans

Re: JavaFX 1.0 On Linux: NetBeans Plugin

For the link http://java.dzone.com/tips/javafx-11-linux-netbeans I'm sorry that I just found that anonymous users can’t download files from javaeye.com(a Chinese dev site), so please go to here to download http://javafxprogramming.googlegroups.com/web/org-netbeans-modules-javafx-sdk-lin.nbm.zip

Re: JavaFX 1.0 On Linux: NetBeans Plugin

Thanks much man, Wonderful. God Bless

Re: JavaFX 1.0 On Linux: NetBeans Plugin

ta much :-)

Add a comment Send a TrackBack