Code Monkey home page Code Monkey logo

groovyfx's Introduction

This documentation pertains to GroovyFX version 0.3.1, which includes support for JavaFX 2.2

Build instructions

Download JavaFX from http://javafx.com and follow the install instructions.

Building with Gradle

  • Set your environment variable JAVAFX_HOME to the directory that contains rt/lib/jfxrt.jar.
  • cd groovyfx
  • gradlew build

To run any specific demo, e.g. the AccordionDemo, you can just call

gradlew AccordionDemo

To see an executable overview of all build tasks including all demos

gradlew --gui

Using GroovyFX from Maven Central

Having GroovyFX in Maven Central (thanks to Sonatype's OSS hosting!) makes it simple to use GroovyFX in everything from simple test scripts to larger projects. The Maven coordinates are as follows

  • groupId: org.codehaus.groovyfx
  • artifactId: groovyfx
  • version: 0.3.1

GroovyFX is simple to include in Groovy scripts thanks to Groovy's Grab annotation, a part of the Grape system. Just include the following line at the top of your script

@Grab('org.codehaus.groovyfx:groovyfx:0.3.1')

When you start such a script, make sure that an explicit reference to your jfxrt.jar is declared in your classpath (even if you use Java 7, which includes JavaFX), e.g. like so

groovy -cp $JAVA_HOME/jre/lib/jfxrt.jar myScript.groovy

Creating a GroovyFX-Based Project with Gradle

It is also simple to set up your own GroovyFX-based project using Gradle as the build system. This sample build.gradle script will get you started.

Just create a new directory for your project and place the Gradle script into it. Then simply call

gradle makeDirs

to set up the rest of your project's directory structure. You will automatically have a dependency on both Groovy and GroovyFX.

Building with IntelliJ IDEA

GroovyFX's build script is capable of generating all of the project files necessary to build the project with IntelliJ IDEA. Just run the following command from the project's root directory

gradlew idea

This will generate a groovyfx.ipr file. From IntelliJ IDEA, select File -> Open Project and navigate to the directory containing the groovyfx.ipr file and open it. You should now be able to build the library and run the demos with IntelliJ IDEA.

Building with NetBeans

The NetBeans project files are included in the code repository. You must customize the project files by following these steps

  1. Add the <JAVAFX_SDK>/rt/lib/jfxrt.jar lib to the project libraries.
  2. In NetBeans, open the nbproject/project.properties file and modify the following property to point to your jfxrt.jar file:

file.reference.jfxrt.jar=<path_to_JavaFX_SDK>/rt/lib/jfxrt.jar

You should now be able to build the library and run the demos with NetBeans.

groovyfx's People

Contributors

aalmiray avatar deanriverson avatar jimclarke5 avatar russel avatar shemnon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.