java-9

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

package javax.jnlp is declared in module java.jnlp, which is not in the module graph

不羁岁月 提交于 2019-12-19 06:01:42
问题 I have a project that uses Java webstart technology. I decided to upgrade the Java version from 8 to 9. However, I faced the following error on compiling: error: package javax.jnlp is not visible import javax.jnlp.DownloadServiceListener; ^ (package javax.jnlp is declared in module java.jnlp, which is not in the module graph) I tried to include C:\Program Files\Java\jdk-9\lib\javaws.jar to the classpath, but still the same issue remains. 回答1: It looks like java.jnlp is not resolved by default

How to use maven with Java9.0.1 and pom packaging in Eclipse Oxygen 1a Release (4.7.1a)?

倾然丶 夕夏残阳落幕 提交于 2019-12-19 04:55:41
问题 The maven project example that is given below shows an error in module-info.java in Eclipse Oxygen: log4j.api cannot be resolved to a module. If I remove the line <packaging>pom<packaging> from pom.xml the error disappears. However, I need to use pom packaging. If I use Java8 without module definitions, the maven part in my real world example works very well. Trying to migrate to Java9 confronted me with this new issue. First I thought I would not correctly reference the log4j dependency.

Mix --class-path and --module-path in javac (JDK 9)

 ̄綄美尐妖づ 提交于 2019-12-19 04:46:07
问题 I tried to follow this question but it does`t work for me. I want to compile 1 module (which does not requires any other module or jar) together with other classes which use this module and will be in unnamed module. javac -cp lib\* --module-path modules --add-modules simpleModule -d out @classes.txt After I run this command I get " package org.... does not exist". But jar with this package is in lib directory lib - directory with my libraries-jars modules - this folder contains module

Java 9, Hibernate and java.sql/javax.transaction

狂风中的少年 提交于 2019-12-19 03:41:29
问题 I've tried to "upgrade" a project using Hibernate to Java 9, but I am having problems getting the module to function properly. The relevant part of my module-info.java looks like this: module test { ... requires java.base; requires hibernate.core; requires javax.transaction; requires java.sql; } and the relevant dependencies in my POM are org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec , 2.0.0.Alpha1 org.hibernate:hibernate-core , 5.2.12.Final javax.transaction:javax

Keystore does not work on Java 9

前提是你 提交于 2019-12-19 03:36:35
问题 I've converted a JKS keystore to the P12 format using portecle, but it probably didn't go well. The keystore works with Java 8 (various versions), but with Java 9 (OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode), I'm getting java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(java.base@9-internal/JavaKeyStore.java:659) at sun.security.util.KeyStoreDelegator.engineLoad(java.base@9-internal/KeyStoreDelegator.java

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

JShell access to variables defined outside of jshell instance

无人久伴 提交于 2019-12-19 02:49:07
问题 From inside jShell script, is it possible to access or register variables that are defined in code that's also creating JShell? Currently there seems to be no mechanism to either access or register a variable to Shell instance, or return none string types from inside JShell (like objects or lambda etc.) ex: import jdk.jshell.JShell; import jdk.jshell.JShellException; import jdk.jshell.SnippetEvent; import java.util.List; public class Main { public static void main(String[] args) throws

Java 9 deprecating SHA1 certificates, or another issue at work?

浪子不回头ぞ 提交于 2019-12-19 02:46:28
问题 [ UPDATE ] Oracle just revised the crypto roadmap (https://www.java.com/en/jre-jdk-cryptoroadmap.html), they will not deprecate SHA-1 for codesigning: 2017-03-14 Target date changed from 2017-04-18 to 2017-07-18. Narrowed scope from all SHA-1 usage: only TLS will be affected, *code signing will not not be affected at this time*. This does not affect, in any way, the fine answer I received below, as it will apply, no doubt, in the future. -- Original post: Attempting to run our Webstart

What is the “Use '--release' option” in IntelliJ 2018.1 preferences?

痴心易碎 提交于 2019-12-18 22:31:11
问题 In the preferences for IntelliJ 2018.1 (Build, Execution, Deployment > Compiler > Java Compiler) is an checkbox labeled: Use '--release' option for cross-compilation (Java 9 and later) I found for information when doing an internet search. The "?" help icon give a 404 error when clicked. What is the purpose/function of this option? 回答1: The help section can be found here: By default, this option is selected. IntelliJ IDEA deduces from project settings when the cross-compilation is needed and