1

I'm using Mac OS X, Netbeans 7.3 Beta 2 and JDK 7 u12.

Netbeans cannot see the JavaFX library. I thought that the JavaFX library comes with JDK 7?

Netbeans see's and uses JDK 7 (coming from JDK 6 I have now lost my retina icons and text!), but when I try and add a library there is no JavaFX library available.

I've gone through the steps shown on Netbeans website to configure and create a JavaFX application, which is where I found that for OS X I need JDK 7, but I have had no luck.

What am I missing?

2 Answers 2

1

jdk7u12 is still pre-release software and may be incompatible with NetBeans.

Specifically, a recent change in the JavaFX structure is HEADS-UP: jfxrt.jar moving to jre/lib/ext. If you try using jdk7u12 with a version of NetBeans coded before the JavaFX structure change (such as NetBeans 7.3 beta 2), it may not work out of the box. In the meantime, I suggest using a production version of the jdk (such as jdk7u11) until NetBeans update their software to work correctly with the relocated jfxrt.jar library.

I know you note that you have followed steps on the NetBeans website, but you don't link to them. Ensure that you have correctly configured a NetBeans JavaFX Platform as detailed in the NetBeans JavaFX setup tutorial (Although that tutorial is currently for NetBeans 7.1 and 7.2, hopefully it will also work for your 7.3 beta). Also, make sure that when you create your project, you create a "JavaFX Application" in NetBeans - as opposed to a regular "Java Application".

If you are still having issues, list your compile errors in your question.

when I try and add a library there is no JavaFX library available.

JavaFX is not configured as a library on NetBeans - it is part of a "JavaFX Platform" as detailed in the setup link in this answer.

coming from JDK 6 I have now lost my retina icons and text!.

Kind of unrelated, but JavaFX in JDK8 will support retina displays (scheduled release data Sept, 2013).

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot, tomorrow morning I will implement your suggestions. I have searched high and low for the jfxrt.jar to add it to my Netbeans classpath but could not find it on my machine. This leads me to believe you are correct in saying I should use jdk7u11. I did create a JavaFX application, but thanks for the heads up. Also, in regards to JDK 8, that is quite interesting and good news! Thanks for your help, I'll be in touch.
1

John,

You might try posting your question on the Oracle JavaFX 2.0 and Later Forum: https://forums.oracle.com/forums/forum.jspa?forumID=1385

Please feel free to tweet the URL of your question to me @JavaFXpert and I'll follow up to make sure it gets answered.

Thanks, Jim Weaver

1 Comment

Thanks a lot Jim, very kind. I will try what Jewelsea has suggested tomorrow morning as it does make sense. I'll be in touch, thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.