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?
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).
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
Related
I've spent too much time trying to find how to do this with. Tips for setting up a dev environment are what I am asking for, however I will start with what I tried so far.
As I understand JavaFX was separated from the JDK after JDK 8, however, for an R&D project, I need to create JavaFX applications that can be built and compiled in Java 11. Normally installing the e(fx)clipse plugins into Eclipse will not work unless a Java 8 installation is pointed to.
So, I have been following this guide: https://gist.github.com/stevenliebregt/bc62a382fc43064136b662ee62172ab3
JavaFX 11 is on LTS from Gluon, it seems, meaning I'd have to pay at least $900 to get it.
So instead, I tried building OpenJFX using following the instructions at this link:
https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX
When I start the build with Gradle, it fails because the minimum supported version for Java to build this is apparently 17.
Any suggestions for building JavaFX projects with JDK 11 is greatly appreciated.
The LTS version is JavaFX 11.0.16. You can download non-LTS 11.x versions from GluonHQ by checking the "include older versions" checkbox on the download page.
Once you clicked it, you see all versions starting with 11 until 20-ea+1, even the obsolete ones.
Your best choice is probably 11.0.2
And to add something you didn't ask for: JDK 11 is compatible with the latest versions of JavaFX, even JavaFX 18, as you can see in the Release Notes:
"As of JDK 11 the JavaFX modules are delivered separately from the
JDK. These release notes cover the standalone JavaFX 18 release.
JavaFX 18 requires JDK 11 or later."
(I emphasized the last part of the quote)
Thanks all, for the good information. I found that the best way to handle this way to build in IntelliJ instead. I can build and run JavaFX 18 easily with JDK 11.
I have installed Apache Netbeans IDE 10.0 on Linux Mint, and followed this recommendation to activate JEE support ( https://superuser.com/questions/1404517/how-to-enable-java-ee-in-apache-netbeans-ide-10 ). I have restarted Netbeans and JEE annotations are marked as errors "Incompatible types : Path cannot be converted to annotation". This happens with all Java EE annotations, and I don't know how to solve this.
I have tried to do clean and build but still the same. Here is a screen shot of some sample errors:
You are having problems because the solution you followed for the accepted answer to the superuser question How to Enable Java EE in Apache Netbeans IDE 10 is wrong.
That answer advises you to use an Update Center to download some plugins used in NetBeans 8.2. That was an appropriate workaround on NetBeans 9, but wrong for NetBeans 10 since the appropriate plugins you need are already available (on the Tools > Plugins > Available Plugins tab), and you just need to install them. You don't need to obtain any plugins from any Update Center for Java EE, and doing so will probably be harmful.
See this SO answer to the SO question How to create Web Application in Apache Netbeans 10? for details on which of the available plugins need to be installed.
Notes:
I think you should first reinstall NetBeans 10 if possible, to start with a clean environment.
If that is not possible you should first uninstall those NetBeans 8.2 plugins you added to NetBeans 10, and then restart NetBeans.
Although the SO answer I linked to is for a slightly different question, the solution applies equally to your problem.
Although not related to your question at all, you might consider also upgrading to Apache NetBeans to version 11.1 if that is possible. If you did that you would still follow exactly the same process detailed in the linked answer for installing the Java EE plugins.
I have the following problem -
I'm trying to install the latest version of XIMA Formcycle software, but I'm having problems with Image Preview feature inside the application.
In their support page, it is described that you need JavaFX 11 in order the image previews to be displayed.
The environment I have is built with Server JRE 8.
My question is - how can I install JavaFX 11 ( from what I understood it is a feature in Java, to run together with Server JRE 8)?
Is JavaFX a part of Server JRE 8?
Thank you.
JavaFX is no longer packaged with the JDK as of JDK 11. You needed to install JavaFX separately.
I am trying to switch from eclipse to netbeans The first thing I am trying do is download the correct version of netbeans. However, when I follow the instrunctions to import a maven project it asks me to choose that from the left hand panel (After a clicking on a new project)
But the only things listed are HTML5 and Javascript projects.
Are there special plugins or am I downloading the wrong version of netbeans? I got here: https://netbeans.org/downloads/index.html and download the java2EE version, but I have not luck. Any ideas?
Since NetBeans is currently in the process of being handed over to Apache by Oracle there are actually four places where you can download different flavors of NetBeans at the moment:
The Oracle location you used is for NetBeans 8.2, the latest stable release. It supports the use of Java 8, but not Java 9 or Java 10.
There is also another Oracle location accessible from the link in your OP if you click the Development link in the top right corner of the page. That version, sometimes known as the "nightly build", also supports Java 9, but not Java 10, and includes some bug fixes not in 8.2
A third option is to download the initial beta Release of NetBeans 9 which supports all Java releases including Java 10, as well as EE 8 from here. See the NetBeans 9 web site for more details. Maven version 3.3.9 is bundled with NetBeans, but you can also use your own external version if you prefer.
The fourth option, and the one I recommend if you are just getting started on NetBeans, is to use the latest release of NetBeans 9 with bug fixes. You can download the latest zip file (which runs on Linux/MacOS/Windows) from here.
The formal release of Netbeans 9 will be sometime next month.
Something is clearly wrong with your current setup if you do not see any options for creating a Java project in the New Project window. Is it possible that you downloaded the HTML5/JavaScript version of NetBeans rather than the Java EE version? They are right next to each other on the download page.
If that is the problem it is possible to upgrade by installing plugins, but it would be much simpler to download again using any of the options described above. You can safely run multiple versions of NetBeans concurrently if you want to try them out, though the GUI is pretty much the same in all cases.
If you only need Java 8/EE 7 then you can stick with option #1, but I you want to use Java 9 and/or Java10 and/or EE 8 then use option #4.
Download the "All" version, then install maven separately.
Open netbeans and navigate to Tools > Options > Java > Maven and change the 'Maven Home' path to the directory where maven is installed.
I am a relative newbie to programming, I have a bit of experience building Swing apps and I now want to try my hand at learning JavaFX. I am using Eclipse Kepler as my IDE.
I understood from the JavaFX website that JavaFX is included in the JDK7 - Quote: "The first step in getting started with JavaFX is to download and install the Java SE 7 JDK, which includes the JavaFX runtime libraries and utilities. See the JDK 7 and JRE 7 Installation Guide for instructions."
However, when I try to import the Oracle JavaFX HelloWorld example (http://docs.oracle.com/javafx/2/get_started/hello_world.htm) into an Eclipse project I get errors on the JavaFx package imports. The only suggestions I get are to create new classes etc or 'search repositories for javafx.application'
Does this mean that Eclipse does not support JavaFX out of the box?
So my question to the community is two-fold:
1. please explain how to use JavaFX working in Eclipse. I checked out other answers which seem to indicate that I should install f(x)eclipse. But...
before you tell me that this is a duplicate question, my second question is please also help me understand how, when Oracle say that JavaFX is included in JDK7, it is not possible to import those packages regardless of the IDE (just like it is possible with Swing).
Thanks
It is part of the JDK but not on a classpath hence extra work needed with Java7 - on Java8 it is on the ext-classpath - so the correct answer is - something being part of JDK does not mean it is on the classpath by default.
So tools like Eclipse need to take extra care of this.
Since JDK 7 update 51 JavaFX is a part of JDK: release notes