Use this tag for questions specific to Java 20, which is version 20 of the Java platform, released on March 21, 2023. In most cases you should also specify the java tag.
Questions tagged [java-20]
18 questions
5
votes
1 answer
Bug in java 20 deconstruction feature?
Is the below a bug in Java 20 or, am I missing something?
If you compile/run the below program, you get the expected printouts. But, if you uncomment the single line in the switch:
import static java.lang.System.*;
public class Main {
record…

Hristo Stoyanov
- 1,508
- 3
- 15
- 24
2
votes
1 answer
How to replace the deprecated URL constructors in Java 20?
All URL constructors are deprecated in Java 20. I replaced new URL(protocol, host, file) by new URI(protocol, host, file, null).toURL() as I have no query and no fragment but I don't know what to do with the…

gouessej
- 3,640
- 3
- 33
- 67
1
vote
1 answer
JDK 20 seems to export "javax."
I am starting to use java modularity. On java.xml module https://docs.oracle.com/en/java/javase/20/docs/api/java.xml/module-summary.html it is reported as Exports a lot of classes prefixed with javax. WhY ? How it'is possible ? I understood that al…

KronosOne
- 67
- 2
- 8
0
votes
1 answer
Java panama FFI, read (char **) from SDL_Vulkan_GetInstanceExtensions
This is the sample code that im trying to run, both SDL.h and SDL_Vulkan.h extracted with JExtract
The problem im having is getting the pNames which is declared as char**, my understanding of java FFI is that anything that start with * or ** and so…

YShow
- 3
- 2
0
votes
1 answer
Is there a way to add JavaFX 20 to my existing Maven Java 20 Project in NetBeans IDE?
Lately I've started programming a game, and to switch scenes I want to incorporate JavaFX.
I've done extensive research to find out if I could use JavaFX in my project, and if so, how.
Could anyone give me some insight on this, and how I would be…

Abraham Agbota
- 3
- 2
0
votes
1 answer
Problems with RunnableInterfaces in Java JDK-20
I have problems to import an interface in Java. In intellj I can execute the code despite errors. When I do it with Java itself it does not work. Can you help me?
This is my interface.
package jexample;
import java.util.Vector;
public interface…

Liffecs
- 1
0
votes
0 answers
UnsupportedClassVersionError How to update compiler in eclipse?
I have a project in spring boot (maven) that tries to start, but gives me a version error
Console:
Error: LinkageError occurred while loading main class com.demoJwt.DemoJwtApplication java.lang.UnsupportedClassVersionError:…
0
votes
0 answers
Java 20: Unable to declare a global variable with "static"
I'm trying to follow a YouTube tutorial on creating a TicTacToe game.
I'm following along, and the instructions and I'm trying to create the playerPositions and computerPositions as ArrayLists. These need to be public/global/static so methods can…

Joey Tatú
- 1
- 2
0
votes
0 answers
Having issues with running Java application with tzdb.dat file
I am using Java JDK 20.0.1 on IntelliJ 2023-1.
I am trying to run a Java application.
I get a very generic error about the tzdb.dat file.
The error is:
Executing pre-compile tasks...
Running 'before' tasks
Checking sources
Copying resources...…

Joey Tatú
- 1
- 2
0
votes
0 answers
Oracle21/Java 20/HikariCP sys_context issue
After recent upgrade from Oracle 12c/java 8 we discovered that user session is interfering with another user session i.e when logged in, user sets it's credentials(ID) onto another user's session.
Required data regarding the project's…

Beck Rakhimov
- 45
- 3
0
votes
2 answers
using multiple validation on same attribute and stop on first failure
Java: 20
Springboot: 3.0.1
@NotBlank(message = "userId id can not be blank.")
@NotEmpty(message = "userId id can not be empty.")
@UUID
@User
private String userId;
now in request, I am not passing userId, I am getting any of the 4 validation error,…

Prafulla Kumar Sahu
- 9,321
- 11
- 68
- 105
0
votes
1 answer
How to initialize firefox with a Selenium Java project using Java 20
Which version of geckodriver should I use for Java version 20 and selenium v4.10.0 ?
while my firefox is 114. when I use geckodriver 0.33.0 I get this error:
Exception in thread "main" org.openqa.selenium.remote.NoSuchDriverException: geckodriver…

Mrym
- 11
- 2
0
votes
0 answers
Java SE Development Kit (JDK) was not found on this computer (WINDOWS 11)
I am new in using Java and its apps (a 2nd year BSIT student based in the Philippines with little to no knowledge in programming)
I really don't know how to fix this, I've already installed JDK on my laptop (64 bit laptop) and netbeans afterwards…

May
- 1
0
votes
1 answer
ScopedValue appears is not immutable
I am experimenting with scoped values, oracle JDK 20 on windows and eclipse 2023-03.
From what I've read ScopedValues are supposed to be immutable, but they do not appear so in my test code
package demoJava20;
import…

Gonen I
- 5,576
- 1
- 29
- 60
-1
votes
1 answer
Error creating bean with name 'dynamodbClient': Lookup method resolution failed
Java: 20.0
Springboot: 3.0.1
Dependency
software.amazon.awssdk
aws-sdk-java
2.20.115
provided
Service…

Prafulla Kumar Sahu
- 9,321
- 11
- 68
- 105