• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. OpenJFX
  3. Main
  4. Getting Started
  5. Building OpenJFX

Page History

Versions Compared

Old Version 29

changes.mady.by.user Steve Northover

Saved on Jun 27, 2013

compared with

New Version 30

changes.mady.by.user Steve Northover

Saved on Jun 27, 2013

  • Previous Change: Difference between versions 28 and 29
  • Next Change: Difference between versions 30 and 31
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Thats's all there is to it.  You can now begin editing source files and doing command line development.  If you are like us, you'll want to develop using your IDE of choice. 

Coming Soon:

...

Use your favourite IDE with OpenJFX

Despite the fact that most of the major IDE's support gradle directly, we have decided to provide pre-generated IDE configuration files in order to make using an IDE smooth and painless.

IMPORTANT: Ensure that you do not have gradle plugins for NetBeans or Eclipse installed.  They will conflict with the pre-generated IDE files.  In furture, we may move to gradle builds within the IDE's as support becomes better.

Get a 32-bit version of the JDK

...

OpenJFX is based on JDK1.8 and IDE support for lambdas and defender methods currently requires that you get a pre-release version.  Over time, this will no longer be necessary. IntelliJ supports this out of the box.  Eclipse and NetBeans do not.

IntelliJ: http://www.jetbrains.com/idea/download/

Eclipse: http://downloads.efxclipse.org/eclipse-java8/

NetBeans: http://bits.netbeans.org/dev/nightly/NetBeans: <link here>

    - this version works on Mac: netbeans-trunk-nightly-201305192300-javase-macosx.dmg
    - this version works on Windows: netbeans-trunk-nightly-201305192300-javase-windows.exe
    - this versions works on Linux: netbeans-trunk-nightly-201306252301-javase-linux.sh
    - other versions may work but Windows gave me some trouble (might be unrelated)

Eclipse: <link here>

IntelliJ: <link here>are likely to work but these are the ones that have been tested

Once you have downloaded and installed an IDE that is JDK8 aware, you will need to configure it to accept JDK8 syntax and generate the right byte codes.  This will be explained later on for each particular IDE.

...

JavaFX is bundled with the JDK as an extension.  The jfxrt.jar is located in the extension directory called 'ext' where Java is installed.  You must remove it from this directory for the IDE's to work properly.  You can make a copy of your current JDK, remove the jar and tell your IDE to use this JDK instead.  Another strategy is to keep the jar around but move it into a sibling 'ext2' directly so that paths can easily be changed manually to use it and you can restore it when necessary.  Regardless, if you do not remove jfxrt.jar, you will get strange errors.

IntelliJ

//TODO - document support

Eclipse

//TODO - document support

NetBeans

Many developers commiters are currently using NetBeans to develop both Java and native code.  NetBeans projects have been configured for both.  Native projects in NetBeans are currently not configured to build using either Make or gradle, however ant build works in NetBeans and will build the classes and jar files needed for the IDE.
Here are the steps to use NetBeans:
  • Edit netbeans.conf
  • Invoke NetBeans
  • Add the JDK8 
  • Import NetBeans projects
  • Rebuild
  • Run sample code
  • Run sample code with grade built shared libraries (optional)

Edit netbeans.conf

We have found the nightly versions of NetBeans to be unstable under JDK8, but fine otherwise.  Further, NetBeans needs to be told not to report errors when private JDK classes referenced.  The netbeans.conf file is located in the etc directory of your NetBeans install.  You will edit netbeans_default_options and netbeans_jdkhome.

  • Change netbeans_default_options to remove "-J-ea" and add "-J-da -J-DCachingArchiveProvider.disableCtSym=true".  It does not hurt to increase memory using "-J-Xmx1024m".
  • Change netbeans_jdkhome to point to a JDK7 JVM.

Here is a sample file for from the Mac.  Your  The Windows and Linux default options might be a bit different.

Code Block
# Options used by NetBeans launcher by default:
# (can be overridden by explicit command line switches)
#
# Note that default -Xmx and -XX:MaxPermSize are selected for you automatically.
# You can find these values in var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx or
# -J-XX:MaxPermSize= here or on the command line.
#
# If you specify the heap size explicitly, you may also want to enable
# Concurrent Mark & Sweep garbage collector.
# (see http://wiki.netbeans.org/FaqGCPauses)
#
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Xmx1024m -J-da -J-DCachingArchiveProvider.disableCtSym=true -J-Dnetbeans.logger.console=true -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"
# Default location of JDK:
# (set by installer or commented out if launcher should decide)
#
# It can be overridden on command line by using --jdkhome <dir>
# Be careful when changing jdkhome.
# There are two NetBeans launchers for Windows (32-bit and 64-bit) and
# installer points to one of those in the NetBeans application shortcut 
# based on the Java version selected at installation time.
#
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.7.0_11.jdk/Contents/Home"

 

Invoke NetBeans

Note that before you invoke NetBeans, you may need to clear your old defaults and start with a fresh NetBeans install or you might get errors.
<IMAGE OF NB>

Add the JDK8 Configuration

<IMAGE OF JDK>Invoke Tools->Java Platforms

Import the NetBeans Projects

Open Project... (you may need to resolve missing junit jars, don't need web or builders for now)
<IMAGE><IMAGE OF NB PROJECTS>

Rebuild

<IMAGE OF NB WITH NO RED SQIGGLES>

   - wait, it takes forever (currently builders and web have errors - ignore them)

Run Sample Code

Create<IMAGE><IMAGE>
   - ... create a new project, set dependencies, set library path so correct DLL's are used ...

Run Sample Code with gradle built shared libraries

<IMAGE>
*THE FOLLOWING IS NO LONGER TRUE*

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 318, "requestCorrelationId": "5fa78505e25f9bca"}