java-11

Jigsaw: Bundling JRE with Automatic Modules

老子叫甜甜 提交于 2019-12-11 04:13:17
问题 Is there a way to bundle the JRE with jlink if not all or even none of the application's dependencies are yet modularized? I do understand that this does not lead to trimmed runtimes but still, I want to bundle a JRE with my application, even untrimmed. 来源: https://stackoverflow.com/questions/53314512/jigsaw-bundling-jre-with-automatic-modules

OpenWebBeans CDI failing in Java 11

岁酱吖の 提交于 2019-12-11 01:27:41
问题 My application is using Java 11, Tomcat 9.0.13 and OpenWeBeans CDI 2.0.8. While starting my Tomcat server I get the following error: Dec 19, 2018 9:59:04 AM org.apache.webbeans.servlet.WebBeansConfigurationListener contextInitialized SEVERE: An error occurred while starting application context path : [/abcServer] Dec 19, 2018 9:59:04 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.apache.webbeans

Error: automatic module cannot be used with jlink: - Maven with JavaFX

混江龙づ霸主 提交于 2019-12-10 23:42:28
问题 I have selected Apache Commons IO, JSerialComm and Ini4J libraries via Maven repository. But when I try to create an image via mvn javafx:jlink I get this errors: [INFO] --- javafx-maven-plugin:0.0.2:jlink (default-cli) @ JUSBPlotter --- [WARNING] Required filename-based automodules detected. Please don't publish this project to a public artifact repository! Error: automatic module cannot be used with jlink: ini4j from file:///root/.m2/repository/org/ini4j/ini4j/0.5.4/ini4j-0.5.4.jar [ERROR]

Automatic modules not found in Eclipse 2018-12 when project is opened

淺唱寂寞╮ 提交于 2019-12-10 21:46:18
问题 I want to switch from Oracle JDK 8 to Open JDK 11 using Eclipse 2018-12. I have the following situation: In my Eclipse workspace I have a main maven project called example with some maven dependencies my_dependency_1, my_dependency_2 that are also maven projects in the same workspace. Currently, only example is modular (and thus contains a module-info.java ). The other projects are non-modular and are included in the pom.xml as well as required (automatic) modules in the module-info.java of

Cannot execute JavaFX sample on macOS: No toolkit found

冷暖自知 提交于 2019-12-10 21:42:56
问题 When trying to launch the JavaFX "Hello world" sample, the native libraries are not found -- or, they are rejected. The symptom is a "No toolkit found" exception. There seems to be some specificity to macOS, as signing is mentioned at some point. What I did (on macOS 10.14.6): Installed Java 12 from https://adoptopenjdk.net Downloaded the JavaFX 12 SDK for macOS from http://gluonhq.com/download/javafx-12-0-2-sdk-mac. Unzipped it as $WRK_DIR/javafx-sdk-12.0.2 Downloaded the JavaFX "hello world

Does Java HTTP Client handle compression

狂风中的少年 提交于 2019-12-10 16:44:35
问题 I tried to find any mention of handling of compression in new Java HTTP Client but failed. Is there a built-in configuration to handle for e.g. gzip or deflate compression? I would expect to have a BodyHandler for e.g. something like this: HttpResponse.BodyHandlers.ofGzipped(HttpResponse.BodyHandlers.ofString()) but I don't see any. I don't see any configuration in HttpClient either. Am I looking in the wrong place or was this intentionally not implemented and deferred to support libraries?

Spring Boot 2.1 with Java 11: Unable to resolve persistence unit root URL

南笙酒味 提交于 2019-12-10 16:00:47
问题 I have an application, that uses Spring Boot and Spring Data JPA with annotation-only based configuration for its persistence layer. I've started migrating this application to the latest Spring Boot version (2.1.x) along with Java (OpenJDK) 11. After configuring the module descriptors, the application starts up, but when Spring reaches the point where it wants to build up the persistence layer, the application stops with the following exception: Caused by: javax.persistence

How to map a JSON response to a Java class using Java 11 HttpClient and Jackson?

我的梦境 提交于 2019-12-10 14:46:31
问题 I'm new to the Java 11 HttpClient and would like to give it a try. I have a simple GET request that return JSON and I would like to map the JSON response to a Java class called Questionnaire . I understand that I can turn the response out of box into a String or an input stream like this HttpRequest request = HttpRequest.newBuilder(new URI(String.format("%s%s", this.baseURI, "/state"))) .header(ACCEPT, APPLICATION_JSON) .PUT(noBody()).build(); HttpResponse<String> response = this.client.send

Java 11, JavaFX, Gradle, Eclipse, nasty failure message

落花浮王杯 提交于 2019-12-10 12:24:34
问题 OS: Linux Mint 18.3, Eclipse "2019-06". Gradle wrapper using Gradle 5.4. Yesterday I spent about 4 hours trying to put together a project in Eclipse which would actually run and display a JavaFX Scene when using Java 11. I managed it in the end due to help from here. But this was just a bog-standard "Java project" in Eclipse. What I actually need to do is develop a Gradle project, using Groovy as the main language. Again, from the same gentleman, José Pereda, I found this answer. This does a

Signing java 11 jar with jarsigner duplicate entry module-info.class

你说的曾经没有我的故事 提交于 2019-12-10 05:45:08
问题 Hi I am new with java modules so this might be a dumb question. I was trying to sign my jar file with keystore and got the following error. user@Ubuntu:libs(master)$ jarsigner -keystore keyStoreFileName Test.jar alias Enter Passphrase for keystore: jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: module-info.class I couldn't find any documentation of how to avoid this. So I did jar -tf to check the content of the jar and yes, it does have multiple module-info.class