openjfx / openjfx-docs Goto Github PK
View Code? Open in Web Editor NEWGetting started guide for JavaFX 11
License: BSD 3-Clause "New" or "Revised" License
Getting started guide for JavaFX 11
License: BSD 3-Clause "New" or "Revised" License
The current example shows the usage of internal Gradle APIs to compute the value of a platform Script variable. It would be better to use public APIs or a plugin to resolve this value as Gradle may remove/change internal APIs at any given time.
Link from the website https://openjfx.io/openjfx-docs/#maven to the pom.xml is dead. in "Getting Started"
There should be a section how to use the jpackager to create runtime images and native installers.
Download the latest JavaFX 11 backported jpackager
http://download2.gluonhq.com/jpackager/11/jdk.packager-linux.zip
http://download2.gluonhq.com/jpackager/11/jdk.packager-osx.zip
http://download2.gluonhq.com/jpackager/11/jdk.packager-windows.zip
Create a Gradle jpackager task
jpackager create-image
Generates an application image.
jpackager create-installer
Generates an application installer.
This is an example of how I am using the jpackager in Gradle:
mainClassName = "$moduleName/com.company.MyApplication"
task createInstaller(type: Exec) {
dependsOn installDist
commandLine '/usr/java/jpackager/jpackager', 'create-installer',
'--name', project.name,
'--version', project.version,
'--description', project.description,
'--vendor', "Company Inc",
'--install-dir', "/opt/company",
'--category', "Some/Category/Application",
'--module-path', new File(installDist.outputs.files.singleFile, "lib"),
'--module', "${mainClassName}",
'--output', "$buildDir/jfx/native"
}
For a Non-Modular project:
Use JLink to create the runtime image, then use that runtime with jpackager.
task createInstaller(type: Exec) {
dependsOn installDist
dependsOn jlink
commandLine '/usr/java/jpackager/jpackager', 'create-installer',
'--name', project.name,
'--version', project.version,
'--description', project.description,
'--vendor', "Company Inc",
'--install-dir', "/opt/company",
'--category', "Some/Category/Application",
'--main-jar', jar.outputs.files.singleFile,
'--runtime-image', 'runtime'
'--input', new File(installDist.outputs.files.singleFile, "lib"),
'--output', "$buildDir/jfx/native"
}
Add a section that explains how to deploy a JavaFX application.
Some points to consider:
Application
(for now)I have followed the instructions contained in the getting started page, creating a modular project in Netbeans ("Modular from IDE" section).
In particular, I have followed the instructions contained in Section 6 to add the JavaFX jmods to the module path, but it seems that the jmods have not been used to create the image. When I run it, I get the error on the initialisation of the quantum renderer.
The output of the Ant build file is also suspicious, because it mentions the JavaFX jars instead of the jmods:
To run this application from the command line without Ant, try:
C:\Program Files\Java\jdk-11.0.1/bin/java -modulepath C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx-swt.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.base.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.controls.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.fxml.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.graphics.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.media.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.swing.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.web.jar;C:\Users\VTorroni\OneDrive - Serco\SW Projects\_libs\jexcelapi-2.6.12\modules\jxl.jar;C:\Users\VTorroni\Documents\NetBeansProjects\CryoStats\build\modules;C:\Program Files\Java\javafx-jmods-11.0.1 cryostats.CryoStats
deploy:
jar:
BUILD SUCCESSFUL (total time: 10 seconds)
If I follow the instructions for Eclipse, the image runs fine. The difference between the two images is that the image generated by NetBeans does not contain the following files:
The default mvn exec:java seems to cause a number of issues, related to how maven starts the java process. For example, see javafxports/openjdk-jfx#316
Using mvn exec:exec and defining the modules etc fixes this, but is more verbose.
I have been struggling for several weeks (!) to get a previously working JavaFX application to build and run in a clean manner using:
I have encountered severe problems doing this, and at this point I have tried almost every idea I had as to how to accomplish it. Much googling has located for me a variety of fragments of Gradle scripts that accomplish one or two of these goals at a time, but which invariably are structured in such a way as to make the other goals difficult or impossible.
This should not be as difficult as it is, but lack of examples that use these items TOGETHER in a straightforward manner has made it an incredibly frustrating experience. For instance:
and so forth. Each of the above observations has involved many hours of googling and experimenting on my part to discover what was going on.
Granted, some of these are Gradle problems, and I will be filing some bug reports against Gradle in the near future, but at the same time, I have found that the documentation for how to use JavaFX with Gradle seems to be very lacking with regards to how to use the two together. Example scripts that use up-to-date JavaFX practices use out-of-date or deprecated Gradle practices, and vice versa. Assumptions are made as to whether or not .fxml files will be used in the project, whether Kotlin will be used, and so forth. This lack of good, clean, simple, complete, and well-supported examples is a severe impediment to using both Gradle and JavaFX.
I have scoured the internet searching for a single example that works and incorporates all of these items together and have so far not found a single one. I am hoping that someone on the JavaFX team who is more knowledgeable than I with JavaFX can provide some examples on the "Getting Started with JavaFX 11" page that will accomplish most if not all of these goals in a single self-consistent script.
My current code, which SOMEWHAT works, and which can perhaps be used as a starting point for documentation or can be mined for ideas, is as follows:
import org.apache.tools.ant.types.resources.JavaResource
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.internal.os.OperatingSystem
plugins {
java
kotlin("jvm") version "1.2.51"
application
}
application {
group = "org.example.something"
version = "1.0-SNAPSHOT"
applicationName = "Something"
mainClassName = "org.example.something.Something"
}
// Note: OperatingSystem is a non-public Gradle API. I am using it here to avoid having to include an
// external plugin to determine the operating system, such as com.google.osdetector. Personally,
// I think that Gradle's OperatingSystem should be made public, and should include an instance method
// for getting the platform name in a format suitable for use with JavaFX Jars (like the following)
// so that using JavaFX with Gradle is simplified. There are already too many hurdles to jump through
// in order to get JavaFX to work with Gradle.
val os = OperatingSystem.current()!!
val platform = when { os.isWindows -> "win"; os.isLinux-> "linux"; os.isMacOsX -> "mac"; else -> error("Unknown OS") }
repositories {
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.openjfx:javafx-fxml:11:$platform")
implementation("org.openjfx:javafx-web:11:$platform")
implementation("org.openjfx:javafx-media:11:$platform")
implementation("org.openjfx:javafx-swing:11:$platform")
implementation("org.openjfx:javafx-base:11:$platform")
implementation("org.openjfx:javafx-graphics:11:$platform")
implementation("org.openjfx:javafx-controls:11:$platform")
// other implementation dependencies go here...
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_10
targetCompatibility = JavaVersion.VERSION_1_10
}
// Put *.fxml files from src/main/java into a 'resources' subtree instead of alongside *.class files.
// This is necessary because Gradle won't copy them from the subtree containing class files into
// a location where getClass().getResource(...) can find them at runtime.
sourceSets {
getByName("main") {
resources {
srcDir(files("src/main/java"))
// outputDir = file("java") // Is this needed or helpful?
}
}
}
// The name of the top-level module (target module) we are building.
val moduleName = "org.example.something"
// This task will compile all Java code in the target module except for test code.
// Note that we are supplying a module path (from the 'dependencies' section above) instead of
// a class path to the Java compiler.
tasks.named<JavaCompile>("compileJava") {
inputs.property("moduleName", moduleName)
doFirst {
val modulePath = classpath.asPath
classpath = files() // Clear classpath since we are using module path instead
options.compilerArgs.addAll(listOf(
"--module-path", modulePath // Supply accumulated class path as module path instead.
))
}
}
// This task will compile all Java test code in the target module.
// Note that we are supplying a module path (from the 'dependencies' section above) instead of
// a class path to the Java compiler.
tasks.named<JavaCompile>("compileTestJava") {
// See https://stackoverflow.com/questions/46991022/junit-5-java-9-and-gradle-how-to-pass-add-modules
inputs.property("moduleName", moduleName)
doFirst {
val modulePath = classpath.asPath
classpath = files() // Clear classpath since we are using module path instead
options.compilerArgs.addAll(listOf(
"--module-path", modulePath // Supply accumulated class path as module path instead.
))
}
}
// This task will compile all Kotlin code found in the Java source tree.
tasks.withType<KotlinCompile> {
// See https://stackoverflow.com/questions/47657755/building-a-kotlin-java-9-project-with-gradle/47669720#47669720
destinationDir = tasks.withType<JavaCompile>().first().destinationDir // Use same dir for Kotlin classes as Java classes.
kotlinOptions.jvmTarget = "1.8"
}
// This task will run the JavaFX version of the app.
// In addition to supply ing the module path, we need to patch the top-level module to
// include the resources directory (where .fxml files will be located) so they can be found
// at runtime.
tasks.named<JavaExec>("run") {
doFirst {
val modulePath = classpath.asPath
jvmArgs = listOf(
"--module-path", modulePath,
"--add-modules", "ALL-MODULE-PATH",
"--patch-module", "$moduleName=build/resources/main",
"--module", "$moduleName/${application.mainClassName}"
)
}
}
In summary, please modify your "Getting Started With JavaFX 11" examples page to provide a working example of a Gradle script that accomplishes these goals. Basically, I would like to see a "Hello, World" that is implemented using idiomatic Gradle, Kotlin, Java 9 modules, and JavaFX with .fxml files.
Thanks in advance.
Hi there,
first I want to ask you if I can contribute to your greate project?
I have read the tutorial and some points I notice some points aren't clear for me or where I thing why is that so?
So my suggestion is that I will add here for every point a commentary is that for your okay (or should I do a list from points which can then chopped?).
https://openjfx.io/openjfx-docs/#install-javafx
examples with Windows tab (Win 7)
note 1:
[Runtime images/Modular from CLI]
[Command Line]
dir /s /b src\*.java > sources.txt & javac --module-path %PATH_TO_FX% -d mods/hellofx @sources.txt & del sources.txt
If there is path with space in name, sources.txt must be (manually) edited and corrected with quotes "" for each path and\
replaced with \\
note 2:
This command (in the same section), works only without quotes ""
(I have path with space in name)
java --module-path "%PATH_TO_FX%;mods" -m hellofx/hellofx.HelloFX
correct:
java --module-path %PATH_TO_FX%;mods -m hellofx/hellofx.HelloFX
same this next
[jlink]
jlink --module-path "%PATH_TO_FX_MODS%;mods" --add-modules=hellofx --output hellofx
notice:
[Run HelloWorld using JavaFX 11]
set PATH_TO_FX="path\to\javafx-sdk-11.0.2\lib"
defines variable with quotes "" yet !
note 3:
When I installed JavaFX 11, first I intuitive copy JavaFX files to Java SE dirs, because there is files with same names and directories.
When I try compile and run sample HelloFX then it throws exception:
Error occurred during initialization of boot layer java.lang.LayerInstantiationException: Package jdk.internal.jimage.decompressor in both module java.base and module jrt.fs
When I remove ..lib\jrt-fs.jar
from original Java installation it works, but I don't know if it is problem somewhere other.
Then I restore original Java SE installation and copy JavaFX-sdk and JavaFX-jmods to separated dirs, out of Java SE dirs, and it works.
But installation help needs to explicitly say about right way of installation.
Usage of 'target="_blank" in 'href' tag.
Article https://mathiasbynens.github.io/rel-noopener/.
They recommend in the article to avoid the 'target="_blank"' flag.
Clicking the above link opens malicious.html in a new tab (using target=_blank). By itself, that’s not very exciting.
However, the malicious.html document in this new tab has a window.opener which points to the window of the HTML document you’re viewing right now, i.e. index.html.
This means that once the user clicks the link, malicious.html has full control over this document’s window object!
When 'target="_blank"' is used, they recommend to add the additional "rel=noopener" flag.
To prevent pages from abusing window.opener, use rel=noopener. This ensures window.opener is null in Chrome 49 & Opera 36, Firefox 52, Desktop Safari 10.1+, and iOS Safari 10.3+.
When I open the website with Firefox (under Linux Mint) I get buttons, but no text.
The modular doc should have different sections visible from the side bar:
The section should cover how to create a JDK that includes JavaFX and how that can be used for local development of regular JavaFX projects
Providing screenshots on how to create the project on each IDE, with ant, maven and gradle.
What's the criteria for listing a project under the "Community" space?
Is there a limit?
In my point of view highlighting or links should be a instrument to show the reader here is something special. In case from the links the interested reader have the option to follow the link for additional information.
To avoid in a technical guide to highlight or link every second word here a little convention which I will use to analyse the guide.
Links:
Highlighing:
For example keywords for links in context from 'Getting Started with JavaFX 11' can be:
and keywords for highlighting:
Next steps:
When I try to build an application, an error is thrown out.
Since we are not creating a modular application in the documentation, we can limit the scope of this to explain use of jlink to create a Java runtime with JavaFX for use with your applications.
I was following instructions on .... Non-modular projects ( IDE )
I did everything exactly as mentioned and i still get error when i run the application.
Error:(3, 26) java: cannot access javafx.application.Application
bad class file: C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib\javafx.graphics.jar(javafx/application/Application.class)
class file has wrong version 54.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
I am using Java 11.0.1 + JavaFX 11.0.1. I follow the sample
https://openjfx.io/openjfx-docs/#install-javafx
and it works just fine on Windows + Linux (Ubuntu 1810, Fedora 29).
On macOS 10.14, javac runs OK as well, but when i try to start the program (java -p /my/path/to/javafx-sdk-11/lib/ --add-modules=javafx.controls HelloFX
) gives this error:
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
...
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
Adding javafx.graphics as well does not help.
I tried this sample two months ago on macOS with JavaFX 11.0 (not 11.0.1) and it worked! So this problem somehow seems to be new in 11.0.1.
Full error message:
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more
Maybe update/add link to vc3.
So far there is no menu, and you have to go one by one document until the end.
There is no license added to the repo nor to the docs
Currently the recommendation on the web site if your app is non-modular is to throw everything out and not even use jlink or modules at all. That seems extreme to me and not really desirable. Why not explain how to use jlink to create a runtime that includes the JavaFX modules and at the same time launch your application as a normal executable jar using the classpath for non-modular dependencies and the module path (or jlink the modules into the runtime) for modular dependencies?
Since at this stage it is still nearly impossible to make a reasonably complex application without running into at least one non-modular dependency, I would think this is a common need.
This would also avoid the need to make a separate non-Application main class or the hideous practice of creating a fat jar.
Currently, almost a third of the sample build.gradle
script is doing OS detection. Why not simplify things? The same can be achieved by
def osName = System.getProperty("os.name").toLowerCase()
ext.platform = osName.contains("mac") ? 'mac' : osName.contains("win") ? 'win' : osName;
Or does the osdetector anything special related to Android and iOS?
The problem here is that people starting with JavaFX & Gradle often use copy & paste to create their first build script or update JavaFX projects to Java 11. And they'd have to merge potential buildscript {..}
blocks from other gradle scripts even though it's not really needed.
As a consequence, artifacts ending on 'win' are not found
I followed the getting started with eclipse to the best of my ability. however I keep getting this error when I try to run the gui class.
Error: Could not find or load main class Files\Java\javafx-sdk-11.0.2\lib
Caused by: java.lang.ClassNotFoundException: Files\Java\javafx-sdk-11.0.2\lib
any help would be very much appreciated! thanks
The gradle projects that include the jar task to create a fat jar use configurations.compile
. With the recent version of the JavaFX plugin, dependencies use implementation
instead of compile
, so the configurations.compile doesn't include them anymore.
Changing to configurations.compileClasspath
fixes the issue.
The tutorial refers to variables like $PATH_TO_FX
or %PATH_TO_FX
that should be resolved by the user, as the IDE won't recognize the literal.
So it should be said explicitly when the variable has to be resolved or not.
Alternatively it can be explained how to set an environment variable for each IDE.
See: https://stackoverflow.com/questions/53435349/using-javafx-with-intellij-idea
JavaFX and Intellij
-> Modular projects
--> 5. Add VM Options (Windows)
This didn't work for me:
--module-path "%PATH_TO_FX%;mods\production"
This worked:
--module-path "${PATH_TO_FX};mods\production"
i.e. same as linux. Not sure if this has to do with Intellij version or bitness.
when i run javafx sample i get this error
Error:(3, 26) java: cannot access javafx.application.Application
bad class file: C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib\javafx.graphics.jar(javafx/application/Application.class)
class file has wrong version 54.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
and when i go to Project Structure > Project/Modules the JDK is set to JDK11
VM option : --module-path C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib --add-modules=javafx.controls,javafx.fxml
I tried to go to Settings > Build, Execution, Deployment > Compiler > Java Compiler
Project bytecode version was set to 8 and i changed it to 11 and the first error was gone but i got new error
Error:java: invalid target release: 11
I was searching on the internet and somebody said go to .idea\compiler.xml and set target to 11 but it's already set to 11 for me but i get the error
There is an issue with Eclipse, running Gradle and modular projects: the JavaFX modules are not added to the module path, but to the class path. When running if fails with module not found.
The workaround we have documented is to download JavaFX SDK and add it as a library, which shouldn't be necessary at all.
There is a better fix using the eclipse
plugin, and moving "manually" the modules to the modular path.
this link (and similar) are bad: https://openjfx.io/CommandLine/Non-modular/Gradle
move references to JavaFX 11 towards 11.0.2
On the page https://openjfx.io/openjfx-docs/, "JavaFX and NetBeans", "Modular with Maven", step 2, don't you also have to modify nbactions.xml as in step 2 of "Non-modular with Maven"?
all link in the page: https://openjfx.io/openjfx-docs/#maven is 404 . as follows
I'm trying to install and run JavaFX 11 to work with JDK 11 on a Windows 10 machine using jGRASP 2.
I've been following the "Getting Started" directions (https://openjfx.io/openjfx-docs/) as well as I can, given that there isn't a set of directions for jGRASP. I'm trying to compile and run HelloFX.java in the directions.
I've downloaded the ZIP and unpacked the JAR files, added the necessary JARs to the classpath, and added the following flags both to the compile and runtime commands, as instructed:
--module-path` "C:\Program Files\Java\javafx-sdk-11.0.2\lib" --add-modules=javafx.controls,javafx.fxml
HelloFX.java will compile successfully. However, when I try to run it, I get the familiar error message:
Error: JavaFX runtime components are missing, and are required to run this application
The "Getting Started" document says that I can fix that problem by including the --module-path and --add-modules flags above. But I've already done that, in both places. I'm at a loss as to how to proceed.
(No, I don't know how to use maven, or IntelliJ, or NetBeans, or Eclipse.)
After getting most of the things up and running with Java11 there is one thing I still haven't figure out: how can I attach javadoc for JavaFX11 in Netbeans?
For OpenJDK 11 it worked with adding https://docs.oracle.com/en/java/javase/11/docs/api
in the platform manager. But I haven't found any documentation on how to do it for JavaFX...
Any pointers are appreciated,
Thomas
There Linux/Mac tab should be preselected, as the code shows the Linux/Mac configuration. And all the tabs from all the docs should use that preselection. When the user changes it, all tabs should change as well.
Somehow this is broken now.
For JavaFX and IntelliJ -> Non-modular with Gradle
Task :compileJava FAILED
E:\projects\appFx\src\main\java\org\openjfx\FXMLController.java:5: error: package javafx.event does not exist import javafx.event.ActionEvent;
I guess incorrect build.gradle:
dependencies {
/* uncomment for cross-platform jar: */
// compile "org.openjfx:javafx-graphics:11:win"
// compile "org.openjfx:javafx-graphics:11:linux"
// compile "org.openjfx:javafx-graphics:11:mac"
}
Instead of using Overriding dependencies, we can add directly the JavaFX jars to the module path in the dependencies dialog (even removing JavaFX11 library that goes into the classpath)
Hello,
I try to migrate my project from the commercial Oracle JDK to the OpenJDK. I use the OpenJDK 11 and OpenJFX 11.0.1. When I try to create a new WebView object
view = new WebView();
program ends with th following exception:
Exception in thread "JavaFX Application Thread" java.lang.IllegalAccessError: superclass access check failed: class com.sun.javafx.sg.prism.web.NGWebView (in unnamed module @0x3fc77788) cannot access class com.sun.javafx.sg.prism.NGGroup (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.sg.prism to unnamed module @0x3fc77788
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
Missing 'tags' in the GitHub project openjfx/docs.
In openjfx/samples
following tags are used:
Gradle 5.0 (https://jaxenter.com/gradle-5-152369.html) is out.
In the page "Run HelloWorld using Gradle" the note points to 4.10+.
The javafx-gradle-plugin
points to gradle-4.10.2-all.zip.
This was a request since JavaFX 8. I know some will say that ogg is old, but mp3 is old too. Ogg audio is a better format for streaming and can be used in lower bit rates than mp3 with higher quality when compared with same bit rate on mp3. It is a open format. It have a wide usage on Linux platform. Please, add support for it.
Hello!
Don't work links in:
https://openjfx.io/openjfx-docs/#gradle
like:
https://openjfx.io/IDE/IntelliJ/Modular/Gradle/hellofx/build.gradle
https://openjfx.io/IDE/IntelliJ/Modular/Gradle/hellofx/src/main/java/org/openjfx/MainApp.java
and others...
I see
404 File not found The site configured at this address does not contain the requested file.
The javafx plugin has hardcoded to the javafx version to 11.0.1, but it can be configured by setting the version variable.
The "Run HelloWorld via Gradle" should mention this.
javafx {
version = "11.0.+"
modules = [ 'javafx.controls' ]
}
After following the directions under "JavaFX and Netbeans -> Modular from IDE", the application builds and jlink runs successfully, but I get the "Error initializing QuantumRenderer: no suitable pipeline found" error due to the JavaFX libs (in my case Mac *.dylib files) not being in the jlink'ed lib directory. If I manually copy them to that dir, the application runs. Suggestions?
When an entry on the navigation tree is clicked, the URL should change with the hash-tag of the entry. This works with single entry but fails with entries which have a child navigation tree.
For example, navigating to https://openjfx.io/openjfx-docs/#modular takes you to "Runtime Images" section but if you have just landed on https://openjfx.io/openjfx-docs/ and clicks on "Runtime Images", it doesn't change the url.
The reason behind this is that the default action of the link is consumed:
$(".list-group-item .ref-group").click(function(e) {
e.preventDefault(); // <------- Here
var $target = $(this).closest('li').find("ul.list-group-sub").slideToggle();
$('html,body').scrollTop(0);
$('ul.list-group-sub').not($target).slideUp();
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.