java-11

Migrating to OpenJDK 11, which version of MySql connector is compatible for java 11?

久未见 提交于 2019-12-04 17:15:41
I am trying to migrate my application from Java 8 to OpenJDK 11. I used MySql connector version 5 and its working fine. Is it required to upgrade MySql connector JAR to version 8.0? I read about it from below link but they don't mention about Java 11. https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-versions-java.html According to your reference, and this , we clearly can see that, MySQL connector version 5 uses JDBC version 3.0, 4.0, 4.1, 4.2 . MySQL connector version 8 uses JDB version 4.2 . Although JDBC version 4.2 supports JDK version 1.8.x, the new (for today) JDBC version 4.3

Does Android support Java 11?

牧云@^-^@ 提交于 2019-12-04 17:03:44
问题 I am new to android development. And I have installed eclipse, java 11 and android sdk tools in my computer. But when I try to build a project it says that to upgrade tools . But I have installed the latest sdk. When I'm reading in internet I found that android doesn't fully support java SE and it mostly support for java SE 6 and 7. - but this was an old post . I found that android do not support java 11 completely. My question is, what is the JDK version that fully support android and do I

Why is String.strip() 5 times faster than String.trim() for blank string In Java 11

半腔热情 提交于 2019-12-04 16:52:34
问题 I've encountered an interesting scenario. For some reason strip() against blank string (contains whitespaces only) significantly faster than trim() in Java 11. Benchmark public class Test { public static final String TEST_STRING = " "; // 3 whitespaces @Benchmark @Warmup(iterations = 10, time = 200, timeUnit = MILLISECONDS) @Measurement(iterations = 20, time = 500, timeUnit = MILLISECONDS) @BenchmarkMode(Mode.Throughput) public void testTrim() { TEST_STRING.trim(); } @Benchmark @Warmup

Error: Java: invalid target release: 11 - IntelliJ IDEA

荒凉一梦 提交于 2019-12-04 15:42:37
问题 I am trying to build an application which was built using java 8, now it's upgraded to java 11. I installed Java 11 using an oracle article in my windows machine and I use IntelliJ IDEA 2017 as my IDE. I changed my system environment variables and set the JAVA_HOME to C:\Program Files\Java\jdk-11.0.1 And added that to the Path variable. C:\>java -version java version "11.0.1" 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9

Install Java 11 OpenJDK on Windows (a system path issue)

无人久伴 提交于 2019-12-04 12:03:03
Java 11 had recently arrived and, as everybody knows, this version has no installation file. To install Java without installer I, of course, had set my system settings PATH and JAVA HOME to the address of the folder where my Java 11 was unzipped (advised by accepted reponses to similar questions). The only thing is that all those advices about system settings make no effect whatsoever on my machine: Checking with a command line outputs my old Java 9 version With Java 9 removed from the folder, command line does not recognise any Java at all. So, is there actually any way to install this

problem in compile time when using “var” in jdk 11 [duplicate]

家住魔仙堡 提交于 2019-12-04 09:58:50
This question already has an answer here: How to avoid IntelliJ to reset language level? 1 answer when I use the word "var" the IDE recognize the command, but when I compile the code, it gives me an error: Error:(10, 17) java: cannot find symbol symbol: class var location: class Exp the code: public final class Exp { public static void main(final String[] args) { var x=5; } } So why does it happen? How can i solve it? the pics: Thanks to @Marv the solution was Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler and raise the Project Bytecode version to 11. (I raised it from 8

create a JAVA Standalone executable application to run on different platforms without any Installation

天涯浪子 提交于 2019-12-04 07:44:49
I have created a run time image for my Java application using jlink and I would like to be able to ship my app as an executable to different platforms. Ideally, it would be a single file that a user can double click and start the application without the need for installing anything. Is there currently a good way to do this? You can make an installer that installs the JDK and the application. Make the application an exe by using something like Launch4j and for a Mac executable follow this tutorial by Oracle: Packaging a Java App for Distribution on a Mac and lastly: For Linux Minecraft uses

Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim)

天涯浪子 提交于 2019-12-04 07:24:09
问题 Java 11 is announced to be the most recent LTS version. So, we're trying to start new services based on this Java version. However, the base Docker image for Java 11 is much larger than the equivalent for Java 8: openjdk:8-jre-alpine: 84 MB openjdk:11-jre-slim: 283 MB (I'm considering only the official OpenJDK and the most lightweight images for each Java version.) Deeper digging uncovered the following "things": the openjdk:11-jre-slim image uses the base image debian:sid-slim . This brings

eclipse RCP 2018-09 + OpenJDK 11 + tycho: how to package an application with the JRE?

好久不见. 提交于 2019-12-04 05:32:53
Currently I'm using tycho to build and package my eclipse RCP app with java 8 and eclipse 4.8, ( JMSToolBox ) For windows distributions, the tycho build process "copies" the JRE v8 (Oracle) into the distribution package in the "jre" directory via an ant task I'm in the process of upgrading to eclipse RCP 2018-09 and Java 11 (OpenJDK) 2 problems arise: OpenJDK 11 does not provide a JRE OOTB. As I do not want to bundle the 300MB of the full JDK in the distribution, is there a way to embed only the equivalent of the JRE for java 11. With tycho itself? by building a specific JRE by using some JDK

Why is OpenJDK 11 Java garbage collector *decreasing* free memory in this sample program?

99封情书 提交于 2019-12-04 05:11:58
When I compile and run the following very simple Java program using OpenJDK 11 (Zulu distribution on Windows 10): public class GCTest { public static void main(String[] args) { System.out.println("Free memory before garbage collection: " + Runtime.getRuntime().freeMemory()); Runtime.getRuntime().gc(); System.out.println("Free memory after garbage collection: " + Runtime.getRuntime().freeMemory()); } } it looks like garbage collection is decreasing the amount of free memory: Free memory before garbage collection: 266881496 Free memory after garbage collection: 7772200 This does not happen when