javafx.base reads package javafx.beans
up vote
0
down vote
favorite
I'm using OpenJDK 11 and OpenJFX 11.0.1 with Gradle in IntelliJ IDEA for my project.
When I use javafx.base module, IntelliJ IDEA reports an error at line 1 (project module declaration) saying I'm not including the javafx.beans module (beans is a package in javafx.base module) in my module requirements.
Gradle jar task executes without any errors or warnings so this error is likely related to IntelliJ IDEA.
Error message: "Module 'hr.caellian.lunar' reads package 'javafx.beans' for both 'javafx.base' and 'javafx.base'"
If I remove 'javafx.base' requirement, 'javafx.base' from above error is replaced with the next javafx module.
I'm also getting a warnings at javafx module requirement lines: "Ambiguous module reference: javafx.base" for 'javafx.base' and so on for each javafx module.
Here's my module-info.java file:
module hr.caellian.lunar
requires java.base;
requires kotlin.stdlib;
requires javafx.base;
requires javafx.controls;
requires javafx.fxml;
opens hr.caellian.lunar.gui to javafx.graphics;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.iconli.core;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires arglib;
requires org.apache.bcel;
I looked online for a solution for at least half an hour now. All I found was a website saying only the modules I already included are necessary for JFX (which was for JavaFX 9 I think).
I redownloaded JavaFX modules to see if I missed copying something but I didn't - javafx.beans module doesn't exist.
'java --list-modules' doesn't list any javafx modules if that's a problem, although I gathered that it should only list jdk modules and OpenJFX is no longer included with OpenJDK.
I installed OpenJFX SDK into JDK folder (lib files copied to lib folder, same for legal), added javafx jar dependency files from lib folder of JDK11 in IDEA manually. I also added all jmod files to jmod folder of JDK11.
Is it possible JavaFX modules have bad module-info.java files or something like that? Is this IntelliJ IDEA bug?
java javafx java-module java-11 openjfx
|
show 3 more comments
up vote
0
down vote
favorite
I'm using OpenJDK 11 and OpenJFX 11.0.1 with Gradle in IntelliJ IDEA for my project.
When I use javafx.base module, IntelliJ IDEA reports an error at line 1 (project module declaration) saying I'm not including the javafx.beans module (beans is a package in javafx.base module) in my module requirements.
Gradle jar task executes without any errors or warnings so this error is likely related to IntelliJ IDEA.
Error message: "Module 'hr.caellian.lunar' reads package 'javafx.beans' for both 'javafx.base' and 'javafx.base'"
If I remove 'javafx.base' requirement, 'javafx.base' from above error is replaced with the next javafx module.
I'm also getting a warnings at javafx module requirement lines: "Ambiguous module reference: javafx.base" for 'javafx.base' and so on for each javafx module.
Here's my module-info.java file:
module hr.caellian.lunar
requires java.base;
requires kotlin.stdlib;
requires javafx.base;
requires javafx.controls;
requires javafx.fxml;
opens hr.caellian.lunar.gui to javafx.graphics;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.iconli.core;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires arglib;
requires org.apache.bcel;
I looked online for a solution for at least half an hour now. All I found was a website saying only the modules I already included are necessary for JFX (which was for JavaFX 9 I think).
I redownloaded JavaFX modules to see if I missed copying something but I didn't - javafx.beans module doesn't exist.
'java --list-modules' doesn't list any javafx modules if that's a problem, although I gathered that it should only list jdk modules and OpenJFX is no longer included with OpenJDK.
I installed OpenJFX SDK into JDK folder (lib files copied to lib folder, same for legal), added javafx jar dependency files from lib folder of JDK11 in IDEA manually. I also added all jmod files to jmod folder of JDK11.
Is it possible JavaFX modules have bad module-info.java files or something like that? Is this IntelliJ IDEA bug?
java javafx java-module java-11 openjfx
2
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
1
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set themodule-path
?
– José Pereda
Nov 9 at 19:53
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
1
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using OpenJDK 11 and OpenJFX 11.0.1 with Gradle in IntelliJ IDEA for my project.
When I use javafx.base module, IntelliJ IDEA reports an error at line 1 (project module declaration) saying I'm not including the javafx.beans module (beans is a package in javafx.base module) in my module requirements.
Gradle jar task executes without any errors or warnings so this error is likely related to IntelliJ IDEA.
Error message: "Module 'hr.caellian.lunar' reads package 'javafx.beans' for both 'javafx.base' and 'javafx.base'"
If I remove 'javafx.base' requirement, 'javafx.base' from above error is replaced with the next javafx module.
I'm also getting a warnings at javafx module requirement lines: "Ambiguous module reference: javafx.base" for 'javafx.base' and so on for each javafx module.
Here's my module-info.java file:
module hr.caellian.lunar
requires java.base;
requires kotlin.stdlib;
requires javafx.base;
requires javafx.controls;
requires javafx.fxml;
opens hr.caellian.lunar.gui to javafx.graphics;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.iconli.core;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires arglib;
requires org.apache.bcel;
I looked online for a solution for at least half an hour now. All I found was a website saying only the modules I already included are necessary for JFX (which was for JavaFX 9 I think).
I redownloaded JavaFX modules to see if I missed copying something but I didn't - javafx.beans module doesn't exist.
'java --list-modules' doesn't list any javafx modules if that's a problem, although I gathered that it should only list jdk modules and OpenJFX is no longer included with OpenJDK.
I installed OpenJFX SDK into JDK folder (lib files copied to lib folder, same for legal), added javafx jar dependency files from lib folder of JDK11 in IDEA manually. I also added all jmod files to jmod folder of JDK11.
Is it possible JavaFX modules have bad module-info.java files or something like that? Is this IntelliJ IDEA bug?
java javafx java-module java-11 openjfx
I'm using OpenJDK 11 and OpenJFX 11.0.1 with Gradle in IntelliJ IDEA for my project.
When I use javafx.base module, IntelliJ IDEA reports an error at line 1 (project module declaration) saying I'm not including the javafx.beans module (beans is a package in javafx.base module) in my module requirements.
Gradle jar task executes without any errors or warnings so this error is likely related to IntelliJ IDEA.
Error message: "Module 'hr.caellian.lunar' reads package 'javafx.beans' for both 'javafx.base' and 'javafx.base'"
If I remove 'javafx.base' requirement, 'javafx.base' from above error is replaced with the next javafx module.
I'm also getting a warnings at javafx module requirement lines: "Ambiguous module reference: javafx.base" for 'javafx.base' and so on for each javafx module.
Here's my module-info.java file:
module hr.caellian.lunar
requires java.base;
requires kotlin.stdlib;
requires javafx.base;
requires javafx.controls;
requires javafx.fxml;
opens hr.caellian.lunar.gui to javafx.graphics;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.iconli.core;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires arglib;
requires org.apache.bcel;
I looked online for a solution for at least half an hour now. All I found was a website saying only the modules I already included are necessary for JFX (which was for JavaFX 9 I think).
I redownloaded JavaFX modules to see if I missed copying something but I didn't - javafx.beans module doesn't exist.
'java --list-modules' doesn't list any javafx modules if that's a problem, although I gathered that it should only list jdk modules and OpenJFX is no longer included with OpenJDK.
I installed OpenJFX SDK into JDK folder (lib files copied to lib folder, same for legal), added javafx jar dependency files from lib folder of JDK11 in IDEA manually. I also added all jmod files to jmod folder of JDK11.
Is it possible JavaFX modules have bad module-info.java files or something like that? Is this IntelliJ IDEA bug?
java javafx java-module java-11 openjfx
java javafx java-module java-11 openjfx
edited Nov 10 at 9:22
Mark Rotteveel
58.2k1475118
58.2k1475118
asked Nov 9 at 19:30
Tin Svagelj
446
446
2
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
1
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set themodule-path
?
– José Pereda
Nov 9 at 19:53
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
1
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20
|
show 3 more comments
2
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
1
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set themodule-path
?
– José Pereda
Nov 9 at 19:53
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
1
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20
2
2
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
1
1
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set the
module-path
?– José Pereda
Nov 9 at 19:53
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set the
module-path
?– José Pereda
Nov 9 at 19:53
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
1
1
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20
|
show 3 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
Managed to fix the problem thanks to the comment from @nullpointer.
The problem was that I had copied files from JavaFX SDK to both my JDK 11 classpath and project lib folder.
If you're seeing this error with the same warnings that means you probably have duplicate module jars (maybe in future modules directly) in your IntelliJ project JDK Classpath and in your build.gradle (or lib folder).
How to fix:
I removed OpenJFX SDK jars from JDK11 Classpath in IntelliJ IDEA in Project Structure. As I deleted JFX SDK jars from my project lib folder, I readded them. Gradle adds every jar in lib folder with:
implementation fileTree(dir: 'lib', include: '**/*.jar')
Also, do not install JavaFX directly into JDK folder. It'll be impossible to update either without keeping unnecessary files, you'll never be able to find all JFX files to remove in case you want yo remove it, JFX src.zip replaces JDK src.zip in lib folder. They're meant to be separate.
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Managed to fix the problem thanks to the comment from @nullpointer.
The problem was that I had copied files from JavaFX SDK to both my JDK 11 classpath and project lib folder.
If you're seeing this error with the same warnings that means you probably have duplicate module jars (maybe in future modules directly) in your IntelliJ project JDK Classpath and in your build.gradle (or lib folder).
How to fix:
I removed OpenJFX SDK jars from JDK11 Classpath in IntelliJ IDEA in Project Structure. As I deleted JFX SDK jars from my project lib folder, I readded them. Gradle adds every jar in lib folder with:
implementation fileTree(dir: 'lib', include: '**/*.jar')
Also, do not install JavaFX directly into JDK folder. It'll be impossible to update either without keeping unnecessary files, you'll never be able to find all JFX files to remove in case you want yo remove it, JFX src.zip replaces JDK src.zip in lib folder. They're meant to be separate.
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
add a comment |
up vote
0
down vote
Managed to fix the problem thanks to the comment from @nullpointer.
The problem was that I had copied files from JavaFX SDK to both my JDK 11 classpath and project lib folder.
If you're seeing this error with the same warnings that means you probably have duplicate module jars (maybe in future modules directly) in your IntelliJ project JDK Classpath and in your build.gradle (or lib folder).
How to fix:
I removed OpenJFX SDK jars from JDK11 Classpath in IntelliJ IDEA in Project Structure. As I deleted JFX SDK jars from my project lib folder, I readded them. Gradle adds every jar in lib folder with:
implementation fileTree(dir: 'lib', include: '**/*.jar')
Also, do not install JavaFX directly into JDK folder. It'll be impossible to update either without keeping unnecessary files, you'll never be able to find all JFX files to remove in case you want yo remove it, JFX src.zip replaces JDK src.zip in lib folder. They're meant to be separate.
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
add a comment |
up vote
0
down vote
up vote
0
down vote
Managed to fix the problem thanks to the comment from @nullpointer.
The problem was that I had copied files from JavaFX SDK to both my JDK 11 classpath and project lib folder.
If you're seeing this error with the same warnings that means you probably have duplicate module jars (maybe in future modules directly) in your IntelliJ project JDK Classpath and in your build.gradle (or lib folder).
How to fix:
I removed OpenJFX SDK jars from JDK11 Classpath in IntelliJ IDEA in Project Structure. As I deleted JFX SDK jars from my project lib folder, I readded them. Gradle adds every jar in lib folder with:
implementation fileTree(dir: 'lib', include: '**/*.jar')
Also, do not install JavaFX directly into JDK folder. It'll be impossible to update either without keeping unnecessary files, you'll never be able to find all JFX files to remove in case you want yo remove it, JFX src.zip replaces JDK src.zip in lib folder. They're meant to be separate.
Managed to fix the problem thanks to the comment from @nullpointer.
The problem was that I had copied files from JavaFX SDK to both my JDK 11 classpath and project lib folder.
If you're seeing this error with the same warnings that means you probably have duplicate module jars (maybe in future modules directly) in your IntelliJ project JDK Classpath and in your build.gradle (or lib folder).
How to fix:
I removed OpenJFX SDK jars from JDK11 Classpath in IntelliJ IDEA in Project Structure. As I deleted JFX SDK jars from my project lib folder, I readded them. Gradle adds every jar in lib folder with:
implementation fileTree(dir: 'lib', include: '**/*.jar')
Also, do not install JavaFX directly into JDK folder. It'll be impossible to update either without keeping unnecessary files, you'll never be able to find all JFX files to remove in case you want yo remove it, JFX src.zip replaces JDK src.zip in lib folder. They're meant to be separate.
answered Nov 10 at 9:18
Tin Svagelj
446
446
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
add a comment |
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
Also, as soon as I fixed my mistake I was no longer able to use class.getResource("path") for loading resources due to how new modules work and gradle not fully supporting them yet. If you run into issues with this, check out this question answers to which explain how to use modules and resources with Gradle.
– Tin Svagelj
Nov 10 at 13:56
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232184%2fjavafx-base-reads-package-javafx-beans%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Can you copy and paste the exact error message you're receiving?
– Jacob G.
Nov 9 at 19:33
1
Are you using Maven or Gradle? Else, how do you set the JavaFX SDK for IntelliJ? Do you set the
module-path
?– José Pereda
Nov 9 at 19:53
@JacobG. added to the question.
– Tin Svagelj
Nov 9 at 20:12
@JoséPereda Gradle, installed JFX SDK into JDK folder, added jars manually to JDK11 for IntelliJ. I'm not setting module-path in gradle yet, not sure if I need to, but that's unrelated to the issue as IntelliJ is giving this error, not gradle, gradle jar task executes properly without errors.
– Tin Svagelj
Nov 9 at 20:12
1
@TinSvagelj I would guess, you've ended up placing same modules twice in your modulepath for JavaFX. Inferring this from the paragraph I installed OpenJFX SDK into JDK folder... and error Ambiguous module reference:....
– nullpointer
Nov 10 at 1:20