javafx-11

Using JavaFX with Intellij IDEA

旧街凉风 提交于 2019-12-04 06:02:11
I've followed a tutorial precisely and I can't seem to get it to work. The tutorial is under JavaFX and Intellij Non-modular from IDE sections: https://openjfx.io/openjfx-docs/#install-java Here is the error message I receive when trying to run the default Intellij Idea JavaFX project: "C:\Program Files\Java\jdk-11.0.1\bin\java.exe" --module-path %PATH_TO_FX% --add-modules=javafx.controls,javafx.fxml --add-modules javafx.base,javafx.graphics --add-reads javafx.base=ALL-UNNAMED --add-reads javafx.graphics=ALL-UNNAMED "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3\lib\idea_rt.jar

@FXML annotation and FXMLLoader class not resolved to a type in Java 11 and JavaFX 11

坚强是说给别人听的谎言 提交于 2019-12-02 11:15:58
问题 Earlier my project used to be on Java 8 but now I am using Java 11 along with JavaFX 11 and now JavaFX has been decoupled from Java since Java 11. I haven't download the JavaFX SDK but added below dependency in pom.xml for getting required modules and jar files which were used to be part of Java itself in earlier versions. <dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-controls</artifactId> <version>11</version> </dependency> But I am getting compilation error can not be

Build executable JAR with JavaFX11 from maven

岁酱吖の 提交于 2019-12-02 10:37:44
I've made a Java app which uses Maven, JavaFX and some other dependencies. Before, it was easy to build an executable jar but since Java11 is modular and does not include JavaFX i just can't build a working one. I've already tried a lot of things but i don't know what i'm supposed to do now. My pom.xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <verbose>true</verbose> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin<

How to execute JAVA FX 11 JAR without providing VM args via CMD

最后都变了- 提交于 2019-12-02 09:07:51
问题 Java : JDK 12 Build Tool : Maven IDE : Eclipse OS : Windows I have a simple piece of java FX 11 code which displays a simple blank screen. I have made deployed an executable jar using eclipse. It works fine when i give the following command using CMD: As it is visible that i need to provide the modules at time of execution of JAR file. If we skip this step we get JAR direct execution error: As I have already tried using maven as : ---Maven pom.xml <project xmlns="http://maven.apache.org/POM/4

How to fix “Error: JavaFX runtime components are missing, and are required to run this application”

倾然丶 夕夏残阳落幕 提交于 2019-12-02 07:25:37
问题 My JavaFx application is running perfectly well from source but When I'm compiling to a single jar file I get error : Error: JavaFX runtime components are missing, and are required to run this application. I'm using Maven as my repository manager and My install with Maven is sucessfull. Note: In my Intellij build artifact I can see that Intellij include JavaFx and all its libraries 回答1: a) For my maven project the trick was to use an extra starter class that does not inherit from javafx

How to execute JAVA FX 11 JAR without providing VM args via CMD

本小妞迷上赌 提交于 2019-12-02 05:32:34
Java : JDK 12 Build Tool : Maven IDE : Eclipse OS : Windows I have a simple piece of java FX 11 code which displays a simple blank screen. I have made deployed an executable jar using eclipse. It works fine when i give the following command using CMD: As it is visible that i need to provide the modules at time of execution of JAR file. If we skip this step we get JAR direct execution error: As I have already tried using maven as : ---Maven pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org

JavaFX applications built to target Java 8 - How to keep running with Java 11?

隐身守侯 提交于 2019-12-02 02:30:24
I recently learned about JavaFX not being included in Java 11, and have a question about how this will work. Right now, I maintain an application that targets Java 8, uses mostly Swing but some JavaFX, and has a non-developer user base. Some of those users are on older operating systems, so I'd like to continue targeting Java 8. However, Java 11 comes out next month, and I'm concerned that some of the users on newer operating systems will upgrade to Java 11, and the JavaFX components of the application will cease to work. So what is the best path forward if you wish to continue targeting Java

custom jre with javaFX 11

旧巷老猫 提交于 2019-12-02 00:20:34
I'm Using JDK11 and JavaFX11. I created a custom JRE for my sample FX module program using Jlink, but when I try to run with the custom JRE, it renders errors as below: This is how I created my custom JRE (no errors) jlink --module-path ..\jmods;%PATH_TO_FX% --add-modules java.base,java.desktop,jdk.unsupported,javafx.graphics --output FXJRE This is how I tried to run (with errors) FXJRE\bin\java --module-path %PATH_TO_FX%;mods -m com.javafxdemo/com.javafxdemo.JavaFXDemo The error messages: Graphics Device initialization failed for : d3d, sw Error initializing QuantumRenderer: no suitable

JavaFX Proguard Obfuscation

折月煮酒 提交于 2019-12-01 03:10:14
问题 I'm struggling with obfuscation of JavaFX application. Using this project as a base: https://github.com/openjfx/samples/tree/master/IDE/IntelliJ/Non-Modular/Gradle Proguard throws this error: java.io.IOException: Can't write [Path\infile.jar] (Can't read [Path\outfile.jar] (Duplicate jar entry [a.class])) Proguard config file: -dontoptimize -dontshrink -libraryjars 'E:\Prog\jdk-11.0.2\jmods' -libraryjars 'E:\Prog\javafx-sdk\lib' # Save meta-data for stack traces -renamesourcefileattribute

javafx.controls could not be found JavaFX 11 / JDK 11.0.1

橙三吉。 提交于 2019-11-30 20:24:39
I am using InteliJ, I've gone through all other solutions that seem to work for everybody else. I was getting an error: Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module @0x5782d366) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module @0x5782d366 I then added the following to VM options in the run config: --module-path="C:\Users\mresp_000\Desktop\Business\Code\SDKS\javafx-sdk-11.0.1\lib" \ --add-modules=javafx.controls \ --add-exports