Newest 'java-12' Questions - Stack Overflow

Questions tagged [java-12]

Use this tag for questions specific to Java 12, which is version 12 of the Java platform, scheduled for release by 19 March 2019. In most cases you should also specify the java tag.

0
votes
0answers
40 views

Illegal reflective access operation occurring in Kotlin while trying to run a hello world program

I am trying to run Kotlin using IntelliJ and I can't run anything without getting an illegal reflective access operation. not even a hello world program. I've tried checking for updates to Kotlin ...
11
votes
6answers
610 views

Why does using different ArrayList constructors cause a different growth rate of the internal array?

I seem to stumble across something interesting in ArrayList implementation that I can't wrap my head around. Here is some code that shows what I mean: public class Sandbox { private static final ...
4
votes
0answers
50 views

Java module system: 'provides with' generic interface

I'm experimenting with the Java module system. I'm trying to use the ServiceLoader for generic interfaces. It works but I've got warnings in the module-info. Here is my minimal code module ...
2
votes
1answer
42 views

jlink: Application jars are not created in /bin folder

I am executing below command to create an image. jlink --module-path jars/:$JAVA_HOME/jmods --add-modules app.main,app.interfaces.impl,app.interfaces.otherimpl --output image 'app.main' module ...
0
votes
0answers
32 views

Does Struts1.x compatible with Java11/Java12?

Am working in a project where the application runs in Struts 1.3 and Java 7, We now need to upgrade the Java version to the latest [just java alone and not Struts] When upgraded to Java 8, we managed ...
0
votes
1answer
39 views

How to open a .jar written with jdk 12

I'm writing a java application using JDK 12. From Java 11, Oracle doesn't provide any JRE. So, JDK 11 and JDK 12 don't have Java Runtime Envirnoment. How can i execute jar written using jdk 11 or jdk ...
0
votes
0answers
62 views

Is it possible to create spring boot maven project with java 12?

I am trying to create web app using spring boot, maven and java 12. I started the project with spring-boot-starter-parent version 2.1.5.RELEASE, java 12 and maven-compiler-plugin version 3.8.1. I ...
1
vote
0answers
51 views

How to fix “Compile failed: For input string: ”\1.8“ -> [Help 1]” in IntelliJ IDEA

I downloaded IntelliJ IDEA and tried coding a plugin. However, as soon as I tried to compile the code, the build failed and the error message popped up: [ERROR] Failed to execute goal org.apache....
-2
votes
0answers
59 views

java 12 Shenandoah: A Low-Pause-Time Garbage Collector

I have a web application with currently using G1 garbage collector and below Heap Memory args: -Xms10G -Xmx25G My team is eager to test out the experimental java 12 Shenandoah: A Low-Pause-Time ...
1
vote
0answers
48 views

Swing classes are extremely slow displaying RTL text

I am confronted with this centuries old issue in Swing and RTL languages. Whenever it comes to show Hebrew text in Swing components of any kind, the application just melts the CPU by font metrics ...
-1
votes
0answers
31 views

How to compile android studio project with latest JavaVersion [duplicate]

What is the latest JavaVersion that I can use as `compileOptions? today I installed jdk-12.0.1. and updated JAVA_HOME in Environment Variables (windows 10 64bit) So I updated gradle file with: ...
1
vote
0answers
42 views

javadoc fail when using jdk12 to build language-level 9 javadoc

I'm using jdk 12 to build a maven project of language level 9. The compile can succeed but it cannot generate javadoc correctly. In short the error code is: [ERROR] Failed to execute goal org.apache....
1
vote
1answer
131 views

Java Runtime version for JDK12

It's not really an error but when I am checking the runtime version it gives me the following, does that mean am I doing something wrong? jshell> Runtime.version() $3 ==> 12.0.1+12
-4
votes
1answer
35 views

Does it matter if you don't learn the latest verion of a Java? [closed]

At the moment I am learning Java 9, despite Java 12 being the latest version. Is this an issue?
0
votes
1answer
53 views

lombok & jackson do not work together with openjdk12

Reproducible here: I used to have java 8.x all was working ok. both open jdk and Oracle. Once JDK & and Oracle JDK is upgraded, I got exceptions from the jackson. Error:(10, 1) java: ...
3
votes
2answers
69 views

VarHandle get/setOpaque

I keep fighting to understand what VarHandle::setOpaque and VarHandle::getOpaque are really doing. It has not been easy so far - there are some things I think I get (but will not present them in the ...
-4
votes
2answers
167 views

How to uninstall jdk 12.0.1 from Mac OS?

I want to uninstall java version 12.0.1 on macbook pro. I have installed java 12.0.1 but its not supported for my eclipse Kepler version.. I have tried by some commands in terminal but its all not ...
9
votes
1answer
97 views

-XX:+StressLCM, -XX:+StressGCM Options for JVM

While playing with some jcstress code, I noticed two parameters that are very new to me: StressLCM and StressGCM. The very first thing to do for me was searching for these in the source code itself ...
1
vote
1answer
93 views

ZonedDateTime change behavior jdk 8/11

I am migrating an application from jdk 8 to 11 and I can see ZonedDateTime change is behavior about daylight saving time. JDK8 ZonedDateTime parse = ZonedDateTime.parse("2037-05-10T19:15:00....
2
votes
0answers
48 views

Allocating Java 12.0.1 memory space using -Xmx not working, -d64 not recognized

I am currently running a GCP server utilizing Debian 9 and Java 12.0.1. I've been trying to allocate 7GB of RAM to the java server using -Xms1G -Xmx7G on startup however when stress testing the server ...
-1
votes
0answers
32 views

Error in cmd: “'javac' is not recognized as an internal or external command, operable program or batch file.”

I'm trying to execute java programs. How to overcome the below error in cmd? 'javac' is not recognized as an internal or external command, operable program or batch file. Followed following steps: 1. ...
0
votes
0answers
11 views

Project Facets for Java 12 on eclipse 2019-03 [duplicate]

I have installed the latest eclipse version 2019-03 with support to JDK 12 and have my application ready to work on JDK 12 on Tomcat 9.0.20. I am using Maven to build my application. However, the ...
0
votes
2answers
78 views

Eclipse 2019-03 support for Tomcat 9

I have installed the latest eclipse version 2019-03 with support to JDK 12. The Servers View was not available. So I installed the plugin Eclipse JST Server Adapters Once installed, I am not able to ...
0
votes
0answers
29 views

Netbeans 11 not detecting dependencies for JavaFX application with JDK 12

I'm running Netbeans 11 with JDK 12. I'm trying to create a JavaFX project - following all the steps in the openjfx documentation here: https://openjfx.io/openjfx-docs/ Specifically: JavaFX and ...
2
votes
1answer
55 views

Unable to connect to google cloud apis with Java 12

After an attempt to update to JDK12 I'm unable to connect to Google Cloud APIs due to SSL handshake errors when using the google cloud client libraries. This worked fine for me with Java 11, and ...
7
votes
2answers
111 views

Print chess symbols using UnicodeBlock?

With jdk12, came Chess symbols (source): Unicode 11.0.0 introduced the following new features that are now included in JDK 12 [...] 4 blocks for the following existing scripts: ...
0
votes
1answer
2k views

Eclipse 2019-03 is showing this message: JRE Oracle Corporation/12.0.1 is not supported, advanced source lookup disabled

I am using Eclipse 2019-03 (current version as of now) and JDK 12 on Windows 10. Whenever I run any code, it runs everything fine. However, it also shows a message colored red. This is the message I ...
11
votes
2answers
196 views

Get declared fields of java.lang.reflect.Fields in jdk12

In java8 it was possible to access fields of class java.lang.reflect.Fields using e.g. Field.class.getDeclaredFields(); In java12 (starting with java9 ?) this returns only a empty array. This doesn'...
0
votes
1answer
48 views

Trouble in compiling classes with dependecy

Under root directory there are two directory named src and classes. Having two java files named Master and Slave. Slave file is under the directory src/com/example/web and compiled master file is ...
3
votes
1answer
82 views

Weird javadoc error (with jdk12) for OSGi version annotation

With the change from Java 11 to Java 12, we now see a weird error when generating Javadoc on package-info files containing OSGi version annotations. The source code is: @Version("1.3.0") package org....
4
votes
2answers
142 views

Java 12 intellij switch expressions doesn't work

I try to use Java 12 in IntelliJ but when I try to run My app occurs error Error:(57, 32) java: switch expressions are a preview feature and are disabled by default. (use --enable-preview to enable ...
3
votes
1answer
479 views

Does lombok works with Java 12?

I was recently working with Java 11 and Lombok on Intellij and it was all fine. I tried Java 12 but now I'm always getting compilation errors, because lombok 's annotations seem to be ignored. Does ...
10
votes
0answers
580 views

Java 11/12 Javadoc with maven results in not generating Javadocs for tests

I have a small project with the following structure: pom.xml src/main/java/ module-info.java de.ps.pl.te/ package-info.java TE.java src/test/java/ de.ps.pl.te.test/ package-info....
1
vote
0answers
62 views

How to convert JSON to a string with escape characters

I am new to JMeter java and Minidev. I am working on this existing module where I have to use minidev libraries I need to convert a JSON form non-indented format to a string format in Jmeter. The API ...
1
vote
1answer
455 views

Jenkins failure Java 12 OpenJDK - The JAVA_HOME environment variable is not defined correctly

Configuring Jenkins (2.121.3) to use JDK 12 in the Global Tool Configuration->JDK installations... menu using "Download URL for binary archive" produces the following error when performing a build: ...
5
votes
1answer
495 views

Run Java 12 application in Docker

I took a look at OpenJDK Docker repository and found no JRE image for Java 12. There is one for Java 11 (openjdk:11.0.2-jre), but for 12 there are only JDK images. Q: How to use OpenJDK JRE 12 to run ...
0
votes
3answers
401 views

Kafka unable to resolve javax/xml/bind/* ClassNotFoundExeption for java 12?

I'm learning kafka and just downloaded kafka 0.10.1 (as it's the requirement of my project) and whenever i run this command line code bin/kafka-server-start.sh config/server.properties i get this ...
6
votes
1answer
259 views

Inferred type does not conform to equality constraint error for unrelated variables

I have the following piece of code public class TeeingCollector { public static void main(String[] args) { // var strs = List.of("abc"); var dividedStrings = Stream.of("...
0
votes
1answer
175 views

How to run Apache CXF wadl2java with JDK 12?

The following command used to work flawlessly: C:\tools\apache-cxf-3.3.1\bin\wsdl2java -client -d generated foo.wsdl It no longer works with the latest version of JDK - 12. I have downloaded the ...
3
votes
2answers
65 views

LocalTime.parse behaves different on JDK 12

I have the following code that works perfectly on Oracle JDK 10 public static void main(String[] args) { final var localTime = LocalTime.parse("8:00AM", DateTimeFormatter.ofPattern("h:mma")); ...
0
votes
1answer
149 views

Different Project SDK and Language Level

I have recently downloaded the IntelliJ IDEA 2018 version and Java JDK 12. When I am configuring IntelliJ with JDK 12, The Project Language level remains the same, hence, I cannot use the feature of ...
5
votes
2answers
895 views

How to enable Java 12 preview features with gradle?

When I tried to build my java code using gradle which has switch expressions, it is throwing this error. error: switch expressions are a preview feature and are disabled by default. I tried running ....
-1
votes
1answer
43 views

How to find a class in java 12's html javadoc, now that class index is removed?

I just upgraded JAVA + Javadoc to version 12. Now, Javadoc has totally been 'restructured' into modules. Example: searching for the description of 'JComboBox', I couldn't find it: there's no more ...
0
votes
0answers
74 views

Eclipselink java 12 compatibility?

I have a java microservice and I tried to go from java 11 to java 12, however doing so resulted in the following error: [EL Severe]: 2019-03-29 12:43:16.869--ServerSession(1678967158)--java.lang....
54
votes
1answer
2k views

Mystifying microbenchmark result for stream API on Java 12 vs. Java 8 with -gc true

As part of my investigation on the difference between using a complex filter or multiple filters in streams, I notice that performance on Java 12 is way slower than on Java 8. Is any explanation for ...
1
vote
1answer
146 views

Groovyc and Java 12 preview feature

I'm trying to compile a project that has some tests written in groovy. The project has --enable-preview for Java 12. I'm using gmavenplus-plugin to do that: <plugin> ...
8
votes
1answer
375 views

Problem running tests with enabled preview features in surefire and failsafe

I'm trying to migrate a project to Java 12, with --enable-preview. I added --enable-preview in compiler settings: <plugin> ...
1
vote
1answer
122 views

JavaFX12: Getting multiple errors when running application, can't solve it with similar question's answers

So, I have google'd (a lot) about this and found multiple questions with similar if not identical problems, but their answers still don't work for me. To provide some context: I have an already made ...
42
votes
1answer
2k views

Why does Java 12 try to convert the result of a switch to a number?

I agree that this code: var y = switch (0) { case 0 -> '0'; case 1 -> 0.0F; case 2 -> 2L; case 3 -> true; default -> 4; }; System.out.println(y); System.out.println(...
1
vote
1answer
82 views

Java 12 Shell not reading keyboard input properly on Windows

Has the Java Shell changed the way it reads keyboard input in Java 12? It sometimes misses keystrokes, and the arrow keys often print random letters instead of bringing up the previous line. This is ...