Set up failed in IDEA community edition, but succeeded in the ultimate edition
enochii opened this issue · 4 comments
Environment: Windows 10
Idea: Community Version, 2022.2.1
When I try to set up Tai-e, I met some problems. It seems that the language feature(multi-line string, pattern matching for switch) are not supported, which confused me. Follow the instruction here, I can not find the Oracle openjdk17.
So I use openjdk 18 instead. I also try the language level as 17(Preview), 18(no new) and 18(Preview), still has errors(see below).
When I run the tests or Main
class, it complains the below errors. Although the idea UI seems all right(i.e. no red line...).
I new a demo project with pattern matching switch, use the openjdk18 and 18(Preview), the program works fine. With 17 - Sealed types, ...
as suggested, the idea UI has red lines, the error also suggest --enable-preview
(but it is only supported in 18). Also the error here is quite different when setting up Tai-e.
This issue may be a little stupid... Any advide? Thanks for your time.
Could you try the following actions ? (IDEA Ultimate Edition is better)
- Delete
.gradle
,build
,.idea
,buildSrc/.gradle
andbuildSrc/build
. - Restart IDEA.
- In
Project Structure
, set the SDK toOracle OpenJdk 18
, set the Language level toSDK default
.
Could you try the following actions ? (IDEA Ultimate Edition is better)
- Delete
.gradle
,build
,.idea
,buildSrc/.gradle
andbuildSrc/build
.- Restart IDEA.
- In
Project Structure
, set the SDK toOracle OpenJdk 18
, set the Language level toSDK default
.
- Refresh Gradle.
@zhangt2333 Thanks for your detailed response! I try the ultimate version, it works like a charm~
Though the community idea still get the same error. Also, in community version, when I execute step 4 Refresh Gradle
, the previously set language level(i.e. SDK Default
) will automatically change to 8(...)
. So I guess this set up issue may be related to the community idea?
Thanks a lot! Have a nice day.