java-module

Java 10 Eclipse + Maven “java.lang.module.FindException: Module myproject not found”

为君一笑 提交于 2021-02-19 06:27:04
问题 I have created a new Java 10 project in Eclipse 4.7.3a This is a maven project with some dependencies. The project is called "MyProject" and below is my module-info.java module myproject { exports myproject; requires commons.logging; requires htmlunit; requires htmlunit.cssparser; requires java.logging; requires java.xml; requires selenium.api; requires selenium.firefox.driver; requires selenium.remote.driver; } when I run the project I get the following Error occurred during initialization

jlink packages current platform's binaries

泪湿孤枕 提交于 2021-02-19 03:58:07
问题 I am trying to build cross-platform archives of an application built using Java 11 and packaged with jlink . For the cross-platform packaging I am basing my build on this answer. I have managed to make my Gradle build download the target platform's JDK and invoke jlink with the appropriate jmods folder, however the target image always includes the binaries and JRE structure of the host platform (in my case Windows, meaning the generated bin folder always includes DLLs and Windows executables)

Compile Module that Depends on an External Jar

给你一囗甜甜゛ 提交于 2021-02-19 01:49:28
问题 I worked through a simple example using Project Jigsaw in Java 11.0.1, built using the oracle JDK 11 on Ubuntu 18.04. Following that example, I have created a simple project which compiles to a module, packages the module into a jar, and then uses jlink to create a standalone distribution. Everything works -- the end result is a smallish folder with a stripped down JRE and my module. The project is made of only three files and some folders: .: build.sh src ./src: com module-info.java ./src

How do Java Module directives impact reflection access into a module?

橙三吉。 提交于 2021-02-18 07:37:05
问题 According to https://www.oracle.com/corporate/features/understanding-java-9-modules.html, the Java Module system introduces the following directives: exports, exports ... to uses provides ... with open, opens, opens ... to What (if any) impact does each directive have on an external module accessing internal members using reflection? For example, does exports <package> allow external modules to access all public , protected , private members of the exported package using reflection? What

Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'

拥有回忆 提交于 2021-02-18 06:06:45
问题 In module-info.java i get the error Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'. Not only does the migration (Java 8 to Java 11) frustrate me slowly but surely, this error does not make any sense to me. The dependencies part fo my build.gradle : def springFrameworkVersion = '5.1.2.RELEASE' def hibernateVersion = '5.3.7.Final' def junitJupiterVersion = '5.3.1' dependencies { compile 'org.transentials:cardhouse-commons:1.1.1' compile 'ch.qos

Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'

馋奶兔 提交于 2021-02-18 06:05:01
问题 In module-info.java i get the error Package 'com.example' reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base'. Not only does the migration (Java 8 to Java 11) frustrate me slowly but surely, this error does not make any sense to me. The dependencies part fo my build.gradle : def springFrameworkVersion = '5.1.2.RELEASE' def hibernateVersion = '5.3.7.Final' def junitJupiterVersion = '5.3.1' dependencies { compile 'org.transentials:cardhouse-commons:1.1.1' compile 'ch.qos

How to fix “Unable to derive module descriptor for .jar file” error in fxml

落花浮王杯 提交于 2021-02-08 05:27:14
问题 I would like to get an image from JAR library to my project. <graphic> <ImageView> <Image url="@/toolbarButtonGraphics/general/TipOfTheDay24.gif"/> </ImageView> </graphic> I've added the library to my module and it seemed to be correct but the compiler throws an error: Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for filepath.jar Caused by: java.lang.IllegalArgumentException: jlfgr.1.0: Invalid module name: '1' is not a

Eclipse cannot find module even the module path is explicitly provided

≯℡__Kan透↙ 提交于 2021-02-07 06:15:50
问题 I have created a module com.company.ep that is located in the source folder com.company.ep . (Yes, I have removed src from the build path and deleted it!) Inside the source folder, I have a couple of packages as the following: com.company.ep <--- root source folder com.company.ep.main <--- package 1 com.company.ep.model <--- package 2 com.company.ep.view <--- package 3 // ... more packages module-info.java The main class is located in the package com.company.ep.main.Main . In my module-info

Eclipse cannot find module even the module path is explicitly provided

懵懂的女人 提交于 2021-02-07 06:13:01
问题 I have created a module com.company.ep that is located in the source folder com.company.ep . (Yes, I have removed src from the build path and deleted it!) Inside the source folder, I have a couple of packages as the following: com.company.ep <--- root source folder com.company.ep.main <--- package 1 com.company.ep.model <--- package 2 com.company.ep.view <--- package 3 // ... more packages module-info.java The main class is located in the package com.company.ep.main.Main . In my module-info

Eclipse cannot find module even the module path is explicitly provided

六月ゝ 毕业季﹏ 提交于 2021-02-07 06:11:58
问题 I have created a module com.company.ep that is located in the source folder com.company.ep . (Yes, I have removed src from the build path and deleted it!) Inside the source folder, I have a couple of packages as the following: com.company.ep <--- root source folder com.company.ep.main <--- package 1 com.company.ep.model <--- package 2 com.company.ep.view <--- package 3 // ... more packages module-info.java The main class is located in the package com.company.ep.main.Main . In my module-info