Document directory
- Open the new javafx Application Wizard
Original address http://netbeans.org/kb/docs/java/javafx-setup.html
Netbeans IDE requires a Java platform available for javafx 2.0. This section describes how to build a Java platform available for javafx2.0 on Nb.
When you create an application for the first time or open the pre-loading wizard, netbeans ide will try to create a Java platform available for javafx. If the Nb cannot be automatically created, a warning will appear. You must manually create the Nb. You can create additional Java platforms, for example, you want to use different JDK.
Here we will introduce automatic and manual creation of the Java platform in two steps:
- Open the new javafx Application Wizard.This is a global starting point. When you open the wizard, netbeans ide tries to create a Java platform available for javafx. If netbeans is successfully created, you have completed the task.
- Manually create available platforms for javafx.If Automatic Creation fails or you want to add a new available javafx platform, you must manually create it.
Open the new javafx Application Wizard
The first step to create a Java platform available for javafx is to open the new javafx Application Wizard of netbeans ide. (Or you can open the new javafx preloader wizard .) If NB does not find the Java platform available for javafx, it will try to create it. If it succeeds, your new creation is complete. Otherwise, you need to create it manually.
Note:Windows is automatically created to the default directory (C: \ Program Files \ oracle \).
Open the new javafx Application Wizard:
- In IDE, click New Project (or File> new project or Ctrl-shift-N ). The new project wizard opens.
- Select javafx category. In the projects window, select javafx application and click Next to open the name and location panel. IDE automatically finds the javafx SDK and tries to generate a Java platform available for javafx.
If the Nb environment is successfully created, different screens may appear:
- Generated successfully:The javafx platform uses the same JDK as the IDE. The platform name is default jfx platform. IDE automatically selects this platform. You have succeeded, unless you want to use different JDK to create another available platform. To do this, follow creating a javafx-enabled platform manually.
- Generation failed:The javafx platform list does not display any available platforms. View creating a javafx-enabled platform manually.
Manually create available platforms for javafx
- Open the Java platform manager netbeans ide Java platform manager:
- In the new javafx application or the new javafx preloader wizard, Click Manage platforms...; or
- Open the Tools menu and select Java platforms. Or
- Open the Project Properties of any Java project, switch to the libraries tab, and click manage platforms...
- Click Add platform... add Java platform. The choose Java platform panel appears in the Wizard. Find the JDK you want.
- Select JDK. You must select JDK 1.6 U 26 or later (or JDK 7 ). Click Next to open the platform name panel.
- After naming your platform, click Finish and return to platform manager. The platform you created has been added to the list.
- Select your platform and open the javafx tag. Currently, javafx is not available for this platform. Select the Enable javafx box. Warning: "The javafx platform is invalid ."
- Click Browse next to the javafx SDK box and find the javafx 2.0 SDK folder.
- Click Open to return to Java platform manager. Now the javafx SDK and javafx javadoc boxes are all filled in. If javafx runtime 2.0 and javafx 2.0 sdks are in the same directory, the javafx runtime box is also filled in. If javafx Runtime is in another directory, you do not need to select sources.
Click Close. You have already done this.
- Return to or select the available platform of javafx when creating the javafx Application Wizard.