VS Code is not recognizing my java project. The project is template code for a minecraft mod found here. Ive installed the plugins
- "Debugger for Java"
- "Java Extension Pack"
- "Language Support for Java by Redhat"
- "Java Test Runner"
- "Project Manager for Java"
I also get an error related to gradle.
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.0.2-bin.zip'.
java.io.StreamCorruptedException: invalid type code: 00
invalid type code: 00
And here is my settings.json file
{
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.configuration.updateBuildConfiguration": "interactive",
"java.home": "/usr/lib/jvm/java-16-openjdk-amd64",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/usr/lib/jvm/java-8-openjdk-amd64",
"default": true
},
]
}
I have no code completion for my Java files. Before it was working and in the lower right corner of visual studio it displayed the java version i was using but now it just says Java. I'm assuming its because there is a problem with gradle and thus cannot figure out my java version. Thank you for your time.
Update: This seems to work and give me auto completion but i stil get a gradle related error mention above.
{
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.configuration.updateBuildConfiguration": "interactive",
"java.home": "/usr/lib/jvm/java-16-openjdk-amd64",
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "/usr/lib/jvm/java-8-openjdk-amd64",
"default": true
},
{
"name": "JavaSE-16",
"path": "/usr/lib/jvm/java-16-openjdk-amd64",
},
]
}