JavaFXHowToBuild

How To Build JavaFX in the NetBeans trunk The main goal of this page is specification of the optimal set of actions a developer has to do to create an environment appropriated for developing the JavaFX Plugin for NetBeans IDE.

This is living document.
Note: This document is a subject to changes until status of the the JavaFX Plugin is not finalized.
If you are interested in changes in this document you might want to sign to this page RSS feed.

Contents


Introduction

This document extends the basic instructions described in the Working With Net Beans Sources document.

Tools

  1. Java SE 5 update 6 or later -> http://java.sun.com
 Do not forget to set JAVA_HOME environment variable.
  1. Apache Ant 1.7.0 --> http://ant.apache.org/.
 Recommended options for ANT_OPTS environment variable: -Xmx512m
  1. Mercurial client. See the Developers' NetBeans Mercurial How-To document.
  2. Put java, ant and hg in your path.

Cloning Mercurial Repositories

Creating Working Directory

To provide development environment you need create empty Working Directory. The <WORKING_DIR> abbreviation will be used in this document instead of actual path to the Working Directory.

For example, if you use Windows platform and chose the hg.netbeans.org as a name of the <WORKING_DIR> and C:\ as base directory then you can execute the following commands to create working directory:

>C:
>cd \
>mkdir hg.netbeans.org
>cd hg.netbeans.org

Cloning Main Repository

cd <WORKING_DIR>
hg clone http://hg.netbeans.org/main >hg.clone.main.log 2>&1

In case if you plan to use the release61 as the main repository then the following actions should be performed instead:

cd <WORKING_DIR>
hg clone http://hg.netbeans.org/release61 >hg.clone.release61.log 2>&1

After completion of the actions a <WORKING_DIR>/hg.clone.XXX.log file will contain the cloning log. Please, check the log before next step. The log should not contain any error messages.

The <MAIN_REPO_NAME> abbreviation is used below in this document instead of the actual name of a main repository (i.e. either main or release61).

Cloning Contrib Repository

cd <WORKING_DIR>/<MAIN_REPO_NAME>
hg clone http://hg.netbeans.org/main/contrib >hg.clone.contrib.log 2>&1

After completion of the actions a <WORKING_DIR>/<MAIN_REPO_NAME>/hg.clone.contrib.log file will contain the cloning log, where <MAIN_REPO_NAME> is either main or release61. Please, check the log before next step. The log should not contain any error messages.

Note: It is possible to execute both tasks (i.e. "Cloning Main Repository" and "Cloning Contrib Repository") in parallel. You can start the "Cloning Contrib Repository" task immediately after a <WORKING_DIR>/<MAIN_REPO_NAME> directory will be created during execution of the "Cloning Main Repository" task.

Download Binary Files & Build

Note: The ANT build procedures require an Internet connection to the http://hg.netbeans.org server. The procedures will have downloaded additional binary files during execution.

Build Java Cluster

  • Firstly, you need build the Java cluster:
cd <WORKING_DIR>/<MAIN_REPO_NAME>
ant -l ant.build.cluster.java.log -Dcluster.config=java
  • check that BUILD SUCCESSFUL in the <WORKING_DIR>/<MAIN_REPO_NAME>/ant.build.cluster.java.log file.

Build JavaFX Cluster

  • ... and then - the JavaFX cluster:
cd <WORKING_DIR>/<MAIN_REPO_NAME>
ant -l ant.build.cluster.javafx.log -Dcluster.config=javafx
  • check that BUILD SUCCESSFUL in the <WORKING_DIR>/<MAIN_REPO_NAME>/ant.build.cluster.javafx.log file.

Run NetBeans IDE with the JavaFX Plugin

To attach the JavaFX Plugin and to make the javafx cluster visible for the NetBeans IDE at run time you need modify the file <WORKING_DIR>/<MAIN_REPO_NAME>/nbbuild/netbeans/etc/netbeans.clusters. The new record javafx should be added at the end of the file. Note, it should be done only once.

Workaround: To avoid an issue with running JavaFX application in the NetBeans IDE (Main Menu / Run / Run Main Project F6) you need change the -J-ea option to the -J-da in the netbeans_default_options property value declared in the <WORKING_DIR>/main/nbbuild/netbeans/etc/netbeans.conf file.

Trouble Shooting Tips

TODO: The section should be revised from viewpoint of using the Mercurial.

  • It is preferable to check out in empty dir. Updating of old repository often leads to multiple errors while building sources.
  • If you are periodically getting the following error while checking out:
cvs [CheckoutAborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: Permission denied

The most probable reason of this error is the antivirus software worked in the real time file protection mode (examples of software that may cause such errors are Symantec AntiVirus and TortoiseSVN Client)

  • If the last version of CVS hangs executing 'login' command use the older version (1.11.9 for example)
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo