java-11

What is the difference between JDK_JAVA_OPTIONS and JAVA_TOOL_OPTIONS when using Java 11?

主宰稳场 提交于 2019-12-04 03:14:33
What is the exact difference between JDK_JAVA_OPTIONS and JAVA_TOOL_OPTIONS when using Java 11? They seem to do the same, but the output is slightly different. That makes me believe they might have different use cases: $ JDK_JAVA_OPTIONS="-Dstuff" java Foo NOTE: Picked up JDK_JAVA_OPTIONS: -Dstuff $ JDK_JAVA_OPTIONS="illegalStuff" java Foo NOTE: Picked up JDK_JAVA_OPTIONS: illegalStuff Error: Cannot specify main class in environment variable JDK_JAVA_OPTIONS $ JAVA_TOOL_OPTIONS="-Dstuff" java Foo Picked up JAVA_TOOL_OPTIONS: -Dstuff $ JAVA_TOOL_OPTIONS="illegalStuff" java Foo Picked up JAVA

How to execute AWS lambda with Open JDK 11 as custom runtime?

眉间皱痕 提交于 2019-12-04 03:10:21
AWS allows to create Lambda function with Java 8 (Open JDK 8) as runtime . I need to create a simple function using Open JDK 11 , somthing like that: package example; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; public class Hello { public String myHandler(int myCount, Context context) { LambdaLogger logger = context.getLogger(); logger.log("received : " + myCount); return String.valueOf(myCount); } } There is an option that allows to use a custom runtime and a tutorial that contains an example with Shell. However there is no

Spring-Boot multi module unable to read properties file from another module

不羁的心 提交于 2019-12-04 01:42:06
问题 I have searched High and low and still I am unable to find a simple answer to this very annoying problem, I have followed this great guide: JWT with multi service app Everything works great but in the end of the guide we are suggested to create a config-service(module) , which I have done. The problem is that I am unable to override the default configuration of JwtConfig class The project structure is as follows: -config-service | JwtConfig.java \ | resources \ | jwtConfig.properties -other

In jshell-11, why does a redeclared reference variable that resets to null still have a type?

巧了我就是萌 提交于 2019-12-04 01:11:24
When redeclaring Integer 'a' in line 33, why does jshell show the reference variable as an instance of Integer (refer to lines 38 & 39)? After the redeclaration, line 34 shows that 'a' is set to null. When 'a' is declared in line 6 but not given a value, or reset to null in line 22, 'a' is not considered an instance of Integer. I would expect that when the reference variable is redeclared, since its value is null, that it would not be an instance of a type; however, that is not the case. 01: java-lava:~ cafedude$ jshell 02: | Welcome to JShell -- Version 11 03: | For an introduction type:

Remote debugging: No connection to Wildfly 14 on OpenJDK 11 at port 8787

跟風遠走 提交于 2019-12-03 23:35:26
问题 I'm trying to connect my debugger to Wildlfy running on Open JDK 11. Despite Wildfly says: Listening for transport dt_socket at address: 8787 My IDE (IntelliJ IDEA CE 2018.1) claims that it doesn't get any connection: Unable to open debugger port (localhost:8787): java.io.IOException "handshake failed - connection prematurally closed" . I'm starting Wildfly via standalone.sh --debug resulting in the following JAVA_OPTS : -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m

spring with jlink, moditect and java 11

隐身守侯 提交于 2019-12-03 21:42:10
thanks to pupeno for his precedent work on spring and moditect that helped me for most of my problem on the subject, however I'm blocked a bit further that he was. my problem is the illegal access exception my poc is available on github I used to add this bit of code to make it work with intelliJ IDEA : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <compilerArgs> <arg>--add-opens java.base/java.lang=ALL-UNAMED</arg> </compilerArgs> <source>11</source> <target>11</target> </configuration> </plugin>

OpenJDK 11 java.lang.ClassCastException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont

ぐ巨炮叔叔 提交于 2019-12-03 20:47:14
i running on Linux my junit test with openJDK 11 and got following error: java.lang.ClassCastException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont (sun.font.CompositeFont and sun.font.PhysicalFont are in module java.desktop of loader 'bootstrap') at java.desktop/sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1086) at java.desktop/sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:965) at java.desktop/sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:903) at java.desktop/sun.font.SunFontManager.findDeferredFont

How to run Wildfly 14 with java 11?

廉价感情. 提交于 2019-12-03 19:59:27
问题 I'm using Wildfly 14 and Java 11 in its runtime configuration. When I start the server I get org.jboss.modules.ModuleNotFoundException: java.se at org.jboss.modules.Module.addPaths(Module.java:1266) at org.jboss.modules.Module.link(Module.java:1622) at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650) at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:296) at org.jboss.modules.Main.main(Main.java:437) How do I run Wildfly 14 with java 11? 回答1: There was some change in

Consuming stack traces noticeably slower in Java 11 than Java 8

拜拜、爱过 提交于 2019-12-03 18:57:42
问题 I was comparing the performance of JDK 8 and 11 using jmh 1.21 when I ran across some surprising numbers: Java version: 1.8.0_192, vendor: Oracle Corporation Benchmark Mode Cnt Score Error Units MyBenchmark.throwAndConsumeStacktrace avgt 25 21525.584 ± 58.957 ns/op Java version: 9.0.4, vendor: Oracle Corporation Benchmark Mode Cnt Score Error Units MyBenchmark.throwAndConsumeStacktrace avgt 25 28243.899 ± 498.173 ns/op Java version: 10.0.2, vendor: Oracle Corporation Benchmark Mode Cnt Score

Getting Android sdkmanager to run with Java 11

◇◆丶佛笑我妖孽 提交于 2019-12-03 17:02:05
问题 I am facing a problem while running Android sdkmanager with Java 11 (Not studio, only SDK tools). I don't want to install JDK 8 or something similar. Is there a way to fix this for Android sdkmanager with JDK 11? I have gone through this answer and it doesn't offer command line fix for java 11. Any other workaround possible? 回答1: If anyone is looking for a Linux fix on Java 11. I built this on top of Wang's answer cd Android/tools/bin mkdir jaxb_lib wget http://central.maven.org/maven2/javax