Questions tagged [java-19]

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

67 questions
1
vote
2 answers

@Component on a @ConfigurationProperties class causing error with spring boot application

When I run an application with @Component and @ConfigurationProperties("currency-service") on a class and then I have a rest controller and an @RequestMapping which prints the value of its object but when I run the spring application it does not…
Ronit Pandey
  • 153
  • 1
  • 8
1
vote
1 answer

Why does my custom ExecutorService bean not call the shutdown method in Java 19 with SpringBoot?

An ExecutorService bean does not call the shutdown method on Java 19 with SpringBoot (2.7.12 or 3.1.0). This results in @SpringBootTest tests never completing. This only happens when you have a custom ExecutorService bean, implements the…
Suniram
  • 11
  • 1
1
vote
1 answer

Cannot resolve symbol 'name' in pattern-matching switch expressions

when I use the word "var" the IDE gives me an error: Error:Cannot resolve symbol 'var' ',' or ')' expected Cannot resolve symbol 'name' The code: import static java.lang.System.*; public class hello { sealed interface ToGreet {}; record…
Anatoly
  • 3,266
  • 4
  • 17
  • 28
1
vote
1 answer

spring-data-elasticsearch java.net.SocketTimeoutException timeout exception

Java: 19 Springboot: 3.0 Dependency: org.springframework.data spring-data-elasticsearch 5.0.2 Configuration import…
1
vote
0 answers

macOS tells me Java version is 11 but I just installed version 19 with Homebrew

I a M1 macOS, I am trying to install Java 18-19, so I do as suggested in How to brew install java? : brew install java After many downloadings, I receive the following message: Warning: openjdk 19.0.1 is already installed and up-to-date. To…
Theo Deep
  • 666
  • 4
  • 15
1
vote
1 answer

Record implementing Interface returns false when checked using instanceof (spring-boot, Java 19)

Code example is below. I have a Record that implements an Interface. When I check if an object of type Record is an instanceof the Interface, the result is false. Is there any special Java behavior with the combination of…
martinspielmann
  • 536
  • 6
  • 19
1
vote
0 answers

Declaration of a value-type Class

I want to specify my Class as a value-type one, so it can be stacked in method calls. I tried the @jdk.internal.ValueBased annotation but it is not exposed from its module. The doco gives a list of required properties, but does not say how to…
Perdi Estaquel
  • 819
  • 1
  • 6
  • 21
1
vote
0 answers

Eclipse IDE will not allow me to create a New FXML Document for JavaFX. Errors out

I am starting to learn JavaFX and SceneBuilder, and while I am installing SceneBuilder I am trying to add a new FXML document. When I right click on my project -> go to new -> other -> JavaFX folder -> New FXML document, if I click "Next" it does…
1
vote
0 answers

Why does moving an iteration-invariant vector out of a loop induce unnecessary GC activity?

I am testing manual vectorization in Java with the jdk.incubator.vector API (JDK 19), and have come across some unexpected behavior w.r.t. Garbage Collection, exemplified here with a toy memset implementation. In the following code, the functions…
1
vote
1 answer

How to know which platform thread is carrying the virtual thread?

Is there a way to know which platform thread is carrying the current virtual thread or pin a virtual thread to a platform thread and get its threadlocal in JDK19? I want to reuse some objects in virtual threads, something like sync.Pool in Golang.
user9959339
1
vote
2 answers

Issues in running virtual threads program on intellij with java19

I am trying to run below simple program with virtual threads on my intellij with java19 version selected. Code public class VTSimple { public static void main(String[] args) { Runnable runnable = () -> System.out.println("Inside…
SRJ
  • 2,092
  • 3
  • 17
  • 36
1
vote
1 answer

Java 19 - FileChannelImpl.transferFrom0 - Function not implemented

I have an error using a Maven plugin with Java 19 specifically. Java 18 is working fine. How could I solve this issue? I'm running within a Docker container on Centos 7.9.2009. When testing within the same container on Ubuntu 20.0 - kernel…
Nicolas Henneaux
  • 11,507
  • 11
  • 57
  • 82
1
vote
1 answer

Jpackage 'missing .jpackage.xml file in app-image dir' on jdk19

I have a script which builds my Java application using jpackage for macOS. First, it generates the app, then it packages it to a DMG file. This used to work with Java 18, but now with the new Java 19 it fails with java.lang.RuntimeException: Error:…
Itchy
  • 2,263
  • 28
  • 41
1
vote
1 answer

Cannot see Java 19 JRE in Eclipse IDE for Java Developers - 2022-09

I have a problem about showing Java Se 19 in Eclipse. After I downloaded Java 19 JDK from this link (https://www.oracle.com/java/technologies/downloads/#jdk19-windows), I opened Eclipse IDE for Java Developers - 2022-09. When I tried to create a…
S.N
  • 2,157
  • 3
  • 29
  • 78
0
votes
1 answer

Exception: Cannot invoke getLastRowNum()" as "sheet" is null

I'm getting the following exception: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "org.apache.poi.xssf.usermodel.XSSFSheet.getLastRowNum()" as "sheet" is null public static Object[][] getTestDataFromExcel(String…