(Translation) Fourth, create a javafx2.0 application in Nb

Source: Internet
Author: User
Tags netbeans
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:

  1. In IDE, click New Project (or File> new project or Ctrl-shift-N ). The new project wizard opens.
  2. 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
  1. 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...
  2. Click Add platform... add Java platform. The choose Java platform panel appears in the Wizard. Find the JDK you want.
  3. Select JDK. You must select JDK 1.6 U 26 or later (or JDK 7 ). Click Next to open the platform name panel.
  4. After naming your platform, click Finish and return to platform manager. The platform you created has been added to the list.
  5. 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 ."
  6. Click Browse next to the javafx SDK box and find the javafx 2.0 SDK folder.
  7. 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.

  8. Return to or select the available platform of javafx when creating the javafx Application Wizard.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.