Developing JavaFX with NetBeans on linux
Here is a quick short tutorial on how to setup NetBeans + JavaFX 1.0 to run under linux for those that do not want to wait on sun releasing a penguin version of their SDK:
(special thanks to Weiqui Gao for the wonderful instructions)
- Download the JavaFX SDK tar gz for Linux (unofficial) here. Unpack it on a directory of your choice.
- If you don’t have netbeans 6.5, download NetBeans 6.5 for linux here
- Install and run NetBeans
- Go to Tools > Plugins -> Downloaded tab and click on Add plugins…
- Browse to the folder where you unpacked the JavaFX SDK and select the folder “netbeans_plugin”. Select all the files there and click “ok”
- Click “install”, accept everything and restart netbeans when prompted.
- Execute the install.sh script on the JavaFX SDK folder.
Type in your netbeans 6.5 path when asked.
Thats it!
Those instructions were not tested in all possible systems and circunstances. If you have any problems, please drop in a comment and I will be glad to help you.
I’m also accepting mirrors for the first file, if someone would like to do some charity
Laure said,
Wrote on February 5, 2009 @ 9:07 am
Thanks very much for your efort, I try to install this night!!!
Leo said,
Wrote on February 5, 2009 @ 8:46 pm
You’re welcome! If you have any problems, please let me know.
Guy said,
Wrote on February 8, 2009 @ 4:19 pm
I add this line : mkdir $netbeans/javafx2
to your install.sh because after javafx install there is no javafx2 folder in my netbeans directory.
#!/bin/sh
echo “Type your netbeans installation directory:”
read netbeans
mkdir $netbeans/javafx2
echo “Copying files…”
cp -r netbeans_required_files/* $netbeans/javafx2/
mkdir $netbeans/javafx2/javafx-sdk1.0
cp -r * $netbeans/javafx2/javafx-sdk1.0/.
echo “Done.”
Leo said,
Wrote on February 8, 2009 @ 11:02 pm
Hmm.. thats interesting. Here my javafx2 directory was created when I installed the plugin on netbeans. I will add the extra line anyways. Thanks for the suggestion!
dedguy21@yahoo.com said,
Wrote on February 9, 2009 @ 2:34 pm
Followed instructions, but when I tried to activate JavaFX 1.0 plugin in my netbeans 6.5 I get this error:
Activation failed: Not all requested modules can be enabled: [StandardModule: org.netbeans.modules.javafx.kit jarFile: /home/me/netbeans-6.5/javafx2/modules/org-netbeans-modules-javafx-kit.jar]
I checked, that module is in the folder, so don’t know why it won’t activate the plug-in, any advice?
Leo said,
Wrote on February 9, 2009 @ 5:38 pm
Is your netbeans installation on your user home or on another directory? If it is in a directory where you have no permissions, try running it as root. Also, sometimes there is a exception description below this error message. Knowing that would be useful to identify the exact cause of your problem.
Stephan H. Wissel said,
Wrote on February 17, 2009 @ 7:24 am
How much of the media stuff works on Linux?
Leo said,
Wrote on February 19, 2009 @ 4:49 am
As far as I tested, most of it works but there is no hardware acceleration. Music support is not too good though.
Rich said,
Wrote on February 19, 2009 @ 9:59 pm
Tried this … I can’t install the JavaFx Debugger UI. I get an error message saying:
Some plugins require capability javafx.sdk.v1_1
I installed all the others. But now when I start up Netbeans, I get a null pointer exception:
java.lang.NullPointerException
at org.netbeans.modules.javafx.platform.platformdefinition.JavaFXPlatformImpl.loadProfileProperties(JavaFXPlatformImpl.java:356)
at org.netbeans.modules.javafx.platform.platformdefinition.DefaultPlatformImpl.create(DefaultPlatformImpl.java:101)
at org.netbeans.modules.javafx.platform.platformdefinition.PlatformConvertor.createPlatform(PlatformConvertor.java:223)
at org.netbeans.modules.javafx.platform.platformdefinition.PlatformConvertor.instanceCreate(PlatformConvertor.java:213)
at org.netbeans.modules.java.platform.DefaultJavaPlatformProvider.getInstalledPlatforms(DefaultJavaPlatformProvider.java:89)
at org.netbeans.api.java.platform.JavaPlatformManager.getInstalledPlatforms(JavaPlatformManager.java:118)
at org.netbeans.modules.java.j2seplatform.platformdefinition.JavadocForBinaryQueryPlatformImpl.findJavadoc(JavadocForBinaryQueryPlatformImpl.java:149)
at org.netbeans.api.java.queries.JavadocForBinaryQuery.findJavadoc(JavadocForBinaryQuery.java:85)
at org.netbeans.modules.javadoc.search.JavadocRegistry.readRoots(JavadocRegistry.java:172)
at org.netbeans.modules.javadoc.search.JavadocRegistry.getDocRoots(JavadocRegistry.java:127)
at org.netbeans.modules.javadoc.search.IndexBuilder.refreshIndex(IndexBuilder.java:194)
at org.netbeans.modules.javadoc.search.IndexBuilder.run(IndexBuilder.java:122)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
I can see JavaFX as an option for creating new projects, but when I try to create one, it fails with a null pointer exception.
Also, I don’t see JavaFX in the installed plugins tab. So not sure how to uninstall it?
Naresh said,
Wrote on March 9, 2009 @ 3:37 am
I faced the same problem… got null pointer exception. I don’t think JavaFX plugins for Netbeans 6.5 with Linux are stable.
I think, it is better to go with NB 6.1
Max said,
Wrote on March 23, 2009 @ 11:15 am
I also got this error on the first netbeans restart.
However after running the javafx install script and restarting netbeans it went away.
Rony said,
Wrote on March 24, 2009 @ 11:17 am
Fala Leonardo!
Estava pesquisando na net sobre um erro em um laptop da HP, e achei uma resposta sua num forum. Resolvi entrar no seu link, e aí descobri que vc é brazuca! hehehe
Só queria desejar boa sorte aí na Park pra ti, e sucessos na vida profissional!
Rony Fagundes, Londres