java-module

What's the correct to make FXML members in Java 9 or 10?

旧时模样 提交于 2019-12-19 07:22:14
问题 After upgrading to Java 10 (from 8), I'm getting these errors: InaccessibleObjectException: Unable to make field private javafx.scene.control.Button tech.flexpoint.dashman.controllers.configurator.RegistrationController.registerButton accessible: module tech.flexpoint.dashman does not "opens tech.flexpoint.dashman.controllers.configurator" to module javafx.fxml Does it mean I should make them public? Does that make the @FXML annotation essentially useless in Java 9 and 10? 回答1: Since you're

What's the correct to make FXML members in Java 9 or 10?

为君一笑 提交于 2019-12-19 07:21:44
问题 After upgrading to Java 10 (from 8), I'm getting these errors: InaccessibleObjectException: Unable to make field private javafx.scene.control.Button tech.flexpoint.dashman.controllers.configurator.RegistrationController.registerButton accessible: module tech.flexpoint.dashman does not "opens tech.flexpoint.dashman.controllers.configurator" to module javafx.fxml Does it mean I should make them public? Does that make the @FXML annotation essentially useless in Java 9 and 10? 回答1: Since you're

Can I exclude an exported package from a Java module?

我怕爱的太早我们不能终老 提交于 2019-12-19 02:59:30
问题 Modules jta and java.sql export package javax.transaction.xa to module dom4j As you can see, both modules jta and java.sql export the same package, javax.transaction.xa . However, the package in jta has classes that I require that are not present in java.sql . I would simply not require the java.sql module, but I need java.sql.SQLException . Is it possible to prevent java.sql from exporting javax.transaction.xa ? 回答1: The JTA GitHub reads the following in confirmation to what @Alan already

How should I name my Java 9 module?

好久不见. 提交于 2019-12-18 12:47:23
问题 Suppose I have a library with groupId = org.abc and artifactId = myLibrary . What is the recommended name for the module name: myLibrary or org.abc.myLibrary ? Is there any official guide for a naming scheme? 回答1: For a while there were two different opinions on your question but during the development of the module system, the community settled on the reverse DNS approach. Unique Module Names - Reverse DNS Here, the assumption is that module names should be globally unique. Given that goal,

Java 9 + maven + junit: does test code need module-info.java of its own and where to put it?

坚强是说给别人听的谎言 提交于 2019-12-18 11:17:30
问题 Let's say I have a Java project using Maven 3 and junit. There are src/main/java and src/test/java directories which contain main sources and test sources, respectively (everything is standard). Now I want to migrate the project to Java 9. src/main/java content represents Java 9 module; there is com/acme/project/module-info.java looking approximately like this: module com.acme.project { require module1; require module2; ... } What if test code needs module-info.java of its own? For example,

How to extract the file jre-9/lib/modules?

[亡魂溺海] 提交于 2019-12-18 11:08:50
问题 In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jmod.exe , but that is for reading .jmod files which is located at jdk-9/jmods and it cannot read the file modules . 回答1: The modules file is a container file. It's internal to the JDK and the format is not documented (it may change at any time). For

Is there a replacement library for CORBA in JDK 11

爷,独闯天下 提交于 2019-12-17 23:06:09
问题 JDK-11 will remove a lot of older parts of the JDK (JEP-320). For some of them (e.g. JAXB) functionality will be provided as regular library. You simply add another dependency and everything works fine again. But not so for CORBA, because There is no significant interest in developing modern applications with CORBA in Java I am however in the painful situation of needing to maintain older applications that still require CORBA while still wanting to update to JDK-11. Is there a replacement

Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1

删除回忆录丶 提交于 2019-12-17 21:55:44
问题 My JDK 9+181 Spring Boot 2.0.0.BUILD-SNAPSHOT CLI application displays this warning on startup: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/home/jan/src/fm-cli/target/fm-cli-0.1.0-SNAPSHOT.jar!/BOOT-INF/lib/spring-core-5.0.0.RELEASE.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting

creating module-info for automatic modules with jdeps in java 9

北慕城南 提交于 2019-12-17 17:59:11
问题 I have 3 jar of jackson library jackson-core-2.8.10.jar jackson-annotations-2.8.0.jar jackson-databind-2.8.10.jar I created module-info.java for both core and annotation successfully and converted them to Named maodule using jdeps. for databind , I tried following command: jdeps --generate-module-info . --module-path %JAVA_HOME%\jomds;jackson.core;jackson.annotations existingmods\jackson-databind-2.8.10.jar Now following error is occuring : Missing dependence: .\jackson.databind\module-info

What's the difference between requires and requires transitive statements in Java 9?

て烟熏妆下的殇ゞ 提交于 2019-12-17 17:38:28
问题 What's the difference between requires and requires transitive module statements in module declaration? For example: module foo { requires java.base; requires transitive java.compiler; } 回答1: Readability recap If module bar requires module drink , then the module system... enforces the presence of drink (called reliable configuration ) allows bar to read drink (called readability) allows code in bar to access public classes in exported packages in drink (called accessibility) Exactly the same