

IntelliJ IDEA + JDK 21 java.util.concurrent package problem - TimeUnit class is not available
I have a problem when I try to use the timeunit class in java.util.concurrent. It happened in oracle jdk 21.0.1 (configuration below) intellij idea 2023.1.5 (community edition) - current latest update (update: as I thought at first , since I ran the update - see solution below).
Configuration on my computer (obtained via java -version in the console):
java version "21.0.1" 2023-10-17 lts
java(tm) se runtime environment (build 21.0.1+12-lts-29)
java hotspot(tm) 64-bit server vm (build 21.0.1+12-lts-29, mixed mode, sharing)
I've checked that I have jdk 21 set in the intellij project structure menu, including the "Projects" and "Modules" sections.
In the screenshot below you can see the basic class created for testing purposes. Some concurrency package classes can be imported fine, but for some reason, the timeunit
class cannot be imported.
Meanwhile, you can see in the screenshot that the app still works despite the issues I have running it.
I don't see this problem when I use java 17 in the ide configuration.
Can you help understand why this problem occurs and how to solve it?
And one more thing. When I enter the "About intellij idea" menu I see the next configuration:
Runtime version: 17.0.7+10-b829.16 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
I'm not sure why it says version 17, could this be the cause of the problem?
Correct Answer
During my search, I found the solution.
The followingSimilar problem topics discussed here, I manually updated IntelliJ to the 2023.2.5 version again, and now the problem has been solved.
It seems that when updating IntelliJ, you may need to perform multiple update processes continuously.
The above is the detailed content of IntelliJ IDEA + JDK 21 java.util.concurrent package problem - TimeUnit class is not available. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Since its inception in 2009, Bitcoin has become a leader in the cryptocurrency world and its price has experienced huge fluctuations. To provide a comprehensive historical overview, this article compiles Bitcoin price data from 2009 to 2025, covering major market events, changes in market sentiment, and important factors influencing price movements.

Bitcoin, as a cryptocurrency, has experienced significant market volatility since its inception. This article will provide an overview of the historical price of Bitcoin since its birth to help readers understand its price trends and key moments. By analyzing Bitcoin's historical price data, we can understand the market's assessment of its value, factors affecting its fluctuations, and provide a basis for future investment decisions.

Since its creation in 2009, Bitcoin’s price has experienced several major fluctuations, rising to $69,044.77 in November 2021 and falling to $3,191.22 in December 2018. As of December 2024, the latest price has exceeded $100,204.

1. First, after opening the VSCode interface, click the management icon in the lower left corner 2. Then, click the shortcut key extension button 3. Then, in the opened extension store column, enter @recommended:keymaps to search 4. Finally, click the IntelliJIDEA Keybindings option Complete the installation

Real-time Bitcoin USD Price Factors that affect Bitcoin price Indicators for predicting future Bitcoin prices Here are some key information about the price of Bitcoin in 2018-2024:

Important Node for Bitcoin Historical Price January 3, 2009: Genesis Block was generated, the first Bitcoin was generated, with a value of USD 0. October 5: The first Bitcoin transaction, a programmer bought two pizzas with 10,000 bitcoins, equivalent to $0.008. February 9, 2010: The Mt. Gox exchange went online and became the main platform for early Bitcoin trading. May 22: Bitcoin breaks through $1 for the first time. July 17: Bitcoin price plunged to $0.008, hitting an all-time low. February 9, 2011: Bitcoin price breaks through $10 for the first time. April 10: Mt. Go

Exception specifications in C++ can specify the types of exceptions that may be thrown by a function to ensure correct handling of exceptions. To use exception specifications, use the noexcept keyword in a function declaration, followed by a list of exception types. For example, in the divide function, use noexcept(std::invalid_argument) to specify that only invalid_argument exceptions may be thrown, ensuring that other exception types will cause compiler errors.

Virtual currency funding rates are fees charged to traders holding positions in derivatives trading. It reflects a premium or discount between the spot market price and the futures contract price when the contract expires. When the spot price is higher than the futures price, the capital rate is negative, which means that traders who short positions pay fees to traders who long positions. On the contrary, when the spot price is lower than the futures price, the capital rate is positive, which means that traders who do long positions pay fees to traders who do short positions.