Questions tagged [java-12]

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

This release is the Reference Implementation of version 12 of the Java SE Platform, as specified by JSR 386 in the Java Community Process.

The JDK/12 production-ready binaries are available for Linux and Windows.

Initial JEPs targetted with this are

Java 12 Final Release Specification

115 questions
1
vote
1 answer

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:
Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
1
vote
1 answer

Why JVM boots a bit faster starting Java 12

It's a slight but noticeable difference: $ for j in {5..12}; do . chjdk $j; time (java -version; for i in {1..1000}; do java x >/dev/null; done); echo ""; done java version "1.5.0_22" Java(TM) 2 Runtime Environment, Standard Edition (build…
Mikhail Kholodkov
  • 23,642
  • 17
  • 61
  • 78
0
votes
0 answers

Graphics2D cannot be resolved to a type

I'm creating a game while following a tutorial and I came across an error. It shows Graphics2D cannot be resolved to a type. I'm new to java and I'm using Eclipse IDE (JavaSE-12). I imported the import java.awt.Graphics2D and it seems to remove the…
Paul
  • 53
  • 4
0
votes
2 answers

java.lang.ClassNotFoundException: java.lang.constant.Constable after upgrading libraries

I have an application running in Tomcat 9.0.45 with JDK 11 (OpenJDK 11.0.11). After upgrading some libraries (Spring 4.3.30 to 5.3.9) using maven, the application throws the following Exception: java.lang.NoClassDefFoundError:…
Manuel M
  • 809
  • 1
  • 10
  • 25
0
votes
0 answers

Alternative to add-exports VM option

I'm trying to run and help develop a Java project (https://github.com/goxr3plus/XR3Player) with Java-12 and Maven. According to the README it requires multiple VM options to be set. This one is representative: --add-exports…
Helge
  • 145
  • 9
0
votes
0 answers

Predeployment of PersistenceUnit fails because is 'uses a non-entity' after adding Maven to the Project

I'm working on a Java Web-App which was working perfectly fine and I wanted to try to deploy it on Heroku (which I've never done before). I read into it, and followed the steps on Atlassian for creating a Pipeline (shich I've also never done…
michi
  • 1
  • 1
0
votes
1 answer

Kotlin compile java 12 and kotlin inside Eclipse or command line

I tried to create a simple Kotlin command line app import java.RegistroJ class Main fun main(){ var registro:RegistroJ? = RegistroJ() registro?.setCognome("Baudo") registro?.setNome("Pippo") var registro2:RegistroJ = RegistroJ() …
LiefLayer
  • 977
  • 1
  • 12
  • 29
0
votes
0 answers

Open a java12 jar file while 8 is still installed

Is it possible to create a executable jar file coded in java12 while java8 is still installed? We use java8 in university but privatly im coding in 12 and so i need to find a way to run a private coded program through a jar file (created with…
mr.jogurt
  • 43
  • 8
0
votes
0 answers

Error while using Java Pattern compile with regex

I am trying to come up with correct regex for the below usecase: prefix.string1.anyNumber.string2.anyNumber.string3 example 1: prefix.abcd.22.pqr.55.xyz example 2: prefix.abcd.22.xyz example 3: prefix.pqr.55.xyz Need to generate a regex that I can…
Zack
  • 2,078
  • 10
  • 33
  • 58
0
votes
0 answers

A Problem related to mysql database and nullpointerexception

I made a JavaFX Application, and its GUI has these four following things: A TextField, called name (takes in the username) A PasswordField, called password (takes in the password) A ToggleGroup, called gender (there's a method related to this…
0
votes
0 answers

A Problem regarding saving items into a database from intelliJ

Ok, so I have been making an GUI application that should take the information from the User and save it into the sql database. This happens when I click the sign up button on the GUI but for some reason everything is working fine but the data is not…
0
votes
0 answers

A Problem regarding connecting mysql connecter with intellij

Ok, so I wanted to connect the MySQL connecter to intellij idea. I added the jar file to the module (also wrote requires mysql.connecter.java in the module.info file) and also added that jar file to the library. Here's the following code and under…
0
votes
0 answers

Asynchronous batch insert/update to tables. Spring MVC, Java 8 (or later, Java 12 )

I'm working on a business requirement that involves 3 tables: We have 3 database tables PRODUCTS ( 60 columns ) CATEGORIZED_PRODUCTS ( 60 columns ): copy matched records from table PRODUCTS CATEGORIES Whenever user creates a new category, we have…
datnt
  • 372
  • 2
  • 15
0
votes
1 answer

I'm unable to install JDK 12 (Java SE12) No source to download

I'm trying to download Java SE 12 or JDK 12 but there's no longer a link to download that: https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html It says: "Java SE 12 Downloads Java SE 12 has reached end of support.…
0
votes
0 answers

Field usr_paths in ClassLoader not found

I'm following a tutorial, which at some point use this code. ClassLoader.class.getDeclaredField("usr_paths"). Why it throws exception java.lang.NoSuchFieldException: usr_paths Classloader class decompiled definition shows that is has. private static…
thmmy95
  • 361
  • 2
  • 18