Giter Club home page Giter Club logo

chuckfx's Introduction

ChuckFX

An example of javaFX app that consumes an API rest throw a JavaFX Service.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Mac OS X and iOS

For example:

export GRAALVM_HOME=/opt/graalvm-svm-darwin-20.1.0-ea+28
  • Set JAVA_HOME to point to the GraalVM installation directory

For example:

export JAVA_HOME=$GRAALVM_HOME

Linux and Android

For example:

export GRAALVM_HOME=/opt/graalvm-svm-linux-20.1.0-ea+28
  • Set JAVA_HOME to point to the GraalVM installation directory

For example:

export JAVA_HOME=$GRAALVM_HOME

Build using Maven

The following goals apply to Linux and Mac OS X.

To build the native image:

mvn clean client:build

To run the native image:

mvn client:run

or simply run the native executable found in target/client.

Build and run the samples on iOS

  • iOS can be built only on Mac OS X

  • Install Homebrew, if you haven't already. Please refer to https://brew.sh/ for more information.

  • Install libusbmuxd

Using brew:

brew install --HEAD libusbmuxd
  • Install libimobiledevice

Using brew:

brew install --HEAD libimobiledevice

Build using Maven

  • Set the target to ios (for iOS devices) in the pom.xml:
<artifactId>client-maven-plugin</artifactId>
<configuration>
    <target>ios</target>
    <mainClass>${mainClassName}</mainClass>
</configuration>
  • Build the native image:
mvn clean client:build
  • Run the app on the connected iOS device:
mvn client:run
  • Package and create an IPA file to submit to TestFlight or to the App Store:
mvn client:package

Note: In order to deploy apps to an iOS device, you need a valid iOS provisioning profile, as explained in the documentation.

Build and run the samples on Android

  • Android can be built only on Linux OS

The client plugin will download the Android SDK and install the required packages. Alternatively, you can define a custom location to the Android SDK by setting the ANDROID_SDK environment variable, making sure that you have installed all the packages from the following list:

  • platforms;android-27
  • platform-tools
  • build-tools;27.0.3
  • ndk-bundle
  • extras;android;m2repository
  • extras;google;m2repository

Build using Maven

  • Set the target to android (for android devices) in pom.xml:
<artifactId>client-maven-plugin</artifactId>
<configuration>
    <target>android</target>
    <mainClass>${mainClassName}</mainClass>
</configuration>
  • Build the native image:
mvn clean client:build
  • Package and create an APK file:
mvn client:package
  • Install the APK file on a connected Android device:
mvn client:install
  • Run the installed app on the connected Android device:
mvn client:run

Built With

  • Maven - The build automation tool
  • GraalVM - The poliglot JVM
  • OpenJavaFX - An open source, next generation client application platform for desktop, mobile and embedded systems built on Java.
  • javafx-maven-plugin - The javaFX plugin for javaFX 11 or higher projets.
  • client-maven-plugin - Plugin that simplifies using Gluon Client for Java/JavaFX maven projects.
  • jackson-databind - The popular framework that allows us to map rest json responses as java objects.
  • chucknorris.io - A free JSON API for hand curated Chuck Norris facts.

Contributing

Feel free to fork it and made pull request.

Authors

  • Diego Dominguez Twitter: DGlez1111

License

ChuckFX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

ChuckFX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ChuckFX. If not, see https://www.gnu.org/licenses/

GPL3 or later

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.