question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JDK 13 support for Gradle

See original GitHub issue

Just updated to JDK13. None of the java imports and primitives are recognized. Any known issues with JKD13? Cleaned language server workspace with the same result.

image

Environment
  • Operating System: Windows 10 x64
  • JDK version: 13
  • Visual Studio Code version: 1.39.0 (Insiders)
  • Java extension version: 0.49.0
Steps To Reproduce
  1. Create JDK13 project in VSCode
  2. Open Java file

Entry in .classpath file (jdk 13):

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13/"/>

Multiple exceptions in output from Extension:

Can’t convert ‘13’ to enum type ‘JavaVersion’

Caused by: java.lang.IllegalArgumentException: Cannot convert string value ‘VERSION_13’ to an enum value of type ‘org.gradle.api.JavaVersion’ (valid case insensitive values: VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_1_9, VERSION_1_10, VERSION_11, VERSION_12, VERSION_HIGHER)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14

github_iconTop GitHub Comments

4reactions
fbriconcommented, Oct 29, 2019

I’m testing 3.1.3 in jdt.ls builds. Hopefully we should be able to provide a CI build tomorrow

1reaction
astrelskycommented, Oct 29, 2019

So I managed to resolve this locally from the advice here https://github.com/eclipse/eclipse.jdt.ls/issues/1196#issuecomment-544814496

I launched eclipse and waited the usual 20 minutes for it to start. Waited another 20 minutes for it to transition to the welcome screen. Added the snapshot to grab that update and then exited eclipse. I then searched my user directory for ‘buildship’ and located the following two jar files:

C:\Users\{user}\.p2\pool\plugins\org.eclipse.buildship.core_3.1.3.v20191025-2152-s.jar
C:\Users\{user}\.p2\pool\plugins\org.gradle.toolingapi_6.0.0.v20191025-2152-s.jar

I then copied those two files into C:\Users\{user}\.vscode-insiders\extensions\redhat.java-0.53.0\server\plugins I then opened C:\Users\astre\.vscode-insiders\extensions\redhat.java-0.53.0\server\config_win\config.ini and replaced@4,reference\:file\:org.eclipse.buildship.core_3.1.2.v20190903-1732.jar with @4,reference\:file\:org.eclipse.buildship.core_3.1.3.v20191025-2152-s.jar and @4,reference\:file\:org.gradle.toolingapi_5.6.1.v20190903-1732.jar with @4,reference\:file\:org.gradle.toolingapi_6.0.0.v20191025-2152-s.jar

After that I re-opened vscode, cleaned the language server workspace and after a couple seconds I was able to work again (debug, build, test, etc.). Is this method recommended? No. I just hope it pushes things in the right direction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compatibility Matrix - Gradle User Manual
Table 1. Java Compatibility. Java version. First Gradle version to support it. 8. 2.0. 9. 4.3. 10. 4.7. 11. 5.0. 12. 5.4. 13....
Read more >
Gradle project with 13 java: Unsupported class file major ...
I have gradle project, that works on Java 12. Today I'm trying to update to Java 13. Build from command line gradle build...
Read more >
How do I tell Gradle to use specific JDK version?
Two ways. In gradle.properties in the .gradle directory in your HOME_DIRECTORY set org.gradle.java.home=/path_to_jdk_directory. or: In your build.gradle
Read more >
Support Java 13 for gradle plugin - Sonar Community
Could you please update gradle sonar plugin to support Java 13? Thanks. Home · Categories · FAQ/Guidelines · Terms of Service ...
Read more >
What's New in Gradle 6.0 - Baeldung
These features include improved dependency management, module metadata publishing, task configuration avoidance, and support for JDK 13.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found