java-11

eclipse tycho + java 11 = Unknown OSGi execution environment: 'JavaSE-11'

心不动则不痛 提交于 2019-12-22 06:45:07
问题 How to build an eclipse RCP app based on Java 11 with tycho? I'm using eclipse 2018-09 RCP + the Java 11 plugin + OpenJDK 11 My application is plugin-based and in all the plugins, the MANIFEST.MF file contains: Bundle-RequiredExecutionEnvironment: JavaSE-11 The tycho build fails with the following exception: [ERROR] Internal error: org.eclipse.tycho.core.osgitools.OsgiManifestParserException: Exception parsing OSGi MANIFEST {...}\META-INF\MANIFEST.MF: Unknown OSGi execution environment:

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

扶醉桌前 提交于 2019-12-21 09:13:01
问题 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

How do you invoke schemagen in Java 11?

我的未来我决定 提交于 2019-12-21 05:15:15
问题 According to Oracle documentation the schemagen tool is removed from the JDK as part of JEP 320 (http://openjdk.java.net/jeps/320). That JEP points to Maven artifacts that now supply the missing tools. The coordinates of the artifacts are wrong in the JEP, updated coordinates are found in an answer to this question: Which artifacts should I use for JAXB RI in my Maven project? What is missing however is how to invoke the tools. There are shell scripts pointed to in the JEP that are in the

Use graalvm via the standard JDK 11

前提是你 提交于 2019-12-21 02:42:38
问题 I have project used Nashorn Javascript engine. I'm trying to migrate to java11 and also migrate from Nashorn to Graal. I've read here that I can use graal via the standard JDK installation starting from JDK 11. Also I've read there that Graal-SDK are uploaded to Maven central, and that there is Java flag polyglot.js.nashorn-compat for easy migration. So I've used jdk11, add maven dependency to pom.xml and used java flag but when I'm trying to get engine by name "graal.js", I've got null here:

How to get Graal SDK packages to work without Maven?

浪子不回头ぞ 提交于 2019-12-21 02:26:34
问题 I am developing a Java application that needs to execute JavaScript. Nashorn JS engine is about to get deprecated and the replacement is the set of APIs provided by Graal SDK which makes use of GraalVM. The virtual machine that essentially executes a number of languages. At least that is what I think. So I spent a day trying to get it working. I downloaded GraalVM rc6 that uses JDK 8. I use IntelliJ IDEA and I added GraalVM as a new JDK. I found it strange that I am supposed to add a virtual

Maven surefire and JDK 11

我怕爱的太早我们不能终老 提交于 2019-12-20 16:16:07
问题 I'm trying to get Maven surefire to run under JDK 11 but I keep getting these errors: If I set reuseForks to true: Error occurred in starting fork, check output in log Process Exit Code: 1 at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246) If I set it to false: Execution default-test

Maven surefire and JDK 11

旧时模样 提交于 2019-12-20 16:14:13
问题 I'm trying to get Maven surefire to run under JDK 11 but I keep getting these errors: If I set reuseForks to true: Error occurred in starting fork, check output in log Process Exit Code: 1 at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:670) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246) If I set it to false: Execution default-test

Why aren't the Netty HTTP handlers sharable?

孤街浪徒 提交于 2019-12-20 04:06:13
问题 Netty instantiates a set of request handler classes whenever a new connection is opened. This seems fine for something like a websocket where the connection will stay open for the lifetime of the websocket. When using Netty as an HTTP server which could receive thousands of requests per second this seems like it would be rather taxing on garbage collection. Every single request instantiates several classes (in my case 10 handler classes) and then garbage collects them some milliseconds later.

Why aren't the Netty HTTP handlers sharable?

喜夏-厌秋 提交于 2019-12-20 04:06:06
问题 Netty instantiates a set of request handler classes whenever a new connection is opened. This seems fine for something like a websocket where the connection will stay open for the lifetime of the websocket. When using Netty as an HTTP server which could receive thousands of requests per second this seems like it would be rather taxing on garbage collection. Every single request instantiates several classes (in my case 10 handler classes) and then garbage collects them some milliseconds later.

Why aren't the Netty HTTP handlers sharable?

拜拜、爱过 提交于 2019-12-20 04:06:04
问题 Netty instantiates a set of request handler classes whenever a new connection is opened. This seems fine for something like a websocket where the connection will stay open for the lifetime of the websocket. When using Netty as an HTTP server which could receive thousands of requests per second this seems like it would be rather taxing on garbage collection. Every single request instantiates several classes (in my case 10 handler classes) and then garbage collects them some milliseconds later.