java-platform-module-system

How to create cross platform executables for JDK9 application using JLink command

天大地大妈咪最大 提交于 2021-01-21 12:26:53
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

How to create cross platform executables for JDK9 application using JLink command

ε祈祈猫儿з 提交于 2021-01-21 12:26:37
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

How to create cross platform executables for JDK9 application using JLink command

ぃ、小莉子 提交于 2021-01-21 12:25:10
问题 I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw. I think jlink command will create only platform specific executable/runtime. 回答1: JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure ). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform

gradle Jigsaw module not found

人盡茶涼 提交于 2020-12-26 07:44:28
问题 I try to run a very simple gradle project which uses java 9 modules, but i receive the following error. /home/vadim/IdeaProjects/test_modules/src/main/java/module-info.java:2: error: module not found: HdrHistogram requires HdrHistogram; ^ Here is it https://github.com/vad0/test_modules. The main class does basically nothing. package app; import org.HdrHistogram.Histogram; public class RunHdr { public static void main(String[] args) { final Histogram histogram = new Histogram(5); System.out

Mockito in maven using JPMS cannot access a member of class with modifiers “private”

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-15 06:25:10
问题 I am migrating a codebase to Java 11 and JPMS / Jigsaw and am having some trouble with mocking. This is the test I am trying to run. import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit

Mockito in maven using JPMS cannot access a member of class with modifiers “private”

无人久伴 提交于 2020-12-15 06:24:01
问题 I am migrating a codebase to Java 11 and JPMS / Jigsaw and am having some trouble with mocking. This is the test I am trying to run. import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit

Why isn't it enough put all JavaFX deps in the classpath w/o bothering about Java modules?

陌路散爱 提交于 2020-12-07 18:08:06
问题 I've been trying to write Hello JavaFX app and faced with necessity consider about Java modules for starting the app. F.e. javafx-maven-plugin 's run goal produce such startup command: [DEBUG] Executing command line: [C:\java\zulu14.29.23-ca-jdk14.0.2-win_x64\bin\java.exe, --module-path, C:\.m2\repository\org\openjfx\javafx-base\14\javafx-base-14-win.jar; C:\.m2\repository\org\openjfx\javafx-base\14\javafx-base-14.jar; C:\.m2\repository\org\openjfx\javafx-controls\14\javafx-controls-14-win

How to access to resources in external resource folder in Java 9 modular project [duplicate]

ぐ巨炮叔叔 提交于 2020-08-06 05:01:06
问题 This question already has answers here : Accessing resource files from external modules (2 answers) How to work with resources in Java 9 modules (1 answer) Java 9 Module system Resources files location (2 answers) Closed 2 years ago . When I have the following code that attempts accessing to a resource: foo/Main.java package foo; import java.io.*; public class Main{ public static void main(String... args) throws IOException{ try(BufferedReader in = new BufferedReader(new InputStreamReader(

How to access to resources in external resource folder in Java 9 modular project [duplicate]

爷,独闯天下 提交于 2020-08-06 05:01:06
问题 This question already has answers here : Accessing resource files from external modules (2 answers) How to work with resources in Java 9 modules (1 answer) Java 9 Module system Resources files location (2 answers) Closed 2 years ago . When I have the following code that attempts accessing to a resource: foo/Main.java package foo; import java.io.*; public class Main{ public static void main(String... args) throws IOException{ try(BufferedReader in = new BufferedReader(new InputStreamReader(