Coder Social home page Coder Social logo

graphs-visualization-sandbox's Introduction

graphs-visualization-sandbox

Sample project for graphs visualization with TornadoFX (readme on russian)

Setup

  • Intellij IDEA 2020.3.2
  • Java 11.0.10 (x86_64) AdoptOpenJDK
  • Gradle 6.8.3
  • Kotlin 1.4.32
  • TornadoFX 1.7.20
  • JavaFX 11.0.2
  • OpenJFX JavaFX Gradle Plugin 0.0.9

Build & Run

Build: ./gradlew build or gradlew.bat build on Windows
Run: ./gradlew run or gradlew.bat run on Windows
Or open, build and run project from Intellij IDEA

Troubleshooting

๐Ÿ‘ป java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled
by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions up to 52.0

๐Ÿ’ก Most likely, Java SDK version 8 (the same 52.0) is installed in the configuration of your project, but JavaFXPlugin was compiled and can only work with Java SDK version 11 (the same 55.0) | source

โœ… Install Java SDK 11 (I have AdoptOpenJDK, for example). Probably will work with version 15 too. Next, we check that the settings in IDEA are set correctly:

  • File | Project Structure... | Project Settings | Project | Project SDK = 11
  • Preferences | Build, Execution, Deployment | Build Tools | Gradle | Gradle JVM = Project SDK
  • NB: do not forget to click "OK" to save the settings

๐Ÿ‘ป Error: JavaFX runtime components are missing, and are required to run this application

๐Ÿ’ก There is some kind of magic inside JavaFX, but I don't want to go into details. There is a solution, but you can read more in the source

โœ… Separate our main class MainApp: App from the actual launch of the application. I.e. we extract the main function from MainApp class and call TornadoFX launch from it, e.g.:

class MainApp: App(MainView::class, Styles::class)

fun main(args: Array<String>) { launch<MainApp>(args) }

graphs-visualization-sandbox's People

Contributors

egorkakulikov avatar skoret avatar

Stargazers

 avatar  avatar

Watchers

 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.