Jundi Aufa
Jundi Aufa

Reputation: 11

VS Code can't recognize Java project or can't detect Java project

When I open the Java project in VS Code, it can't recognize Java language and the Java build status is always "Building" and when I see the java log the build status doesn't show anything.

I have already installed Java extension pack.

It makes it hard for me to import Java libraries and also hard to get autocomplete when I code Java.

enter image description here

Upvotes: 0

Views: 2604

Answers (2)

Jundi Aufa
Jundi Aufa

Reputation: 11

I have found the solution, by adding -Xlog:jni+resolve=off to java.jdt.ls.vmargs and it's solved

Upvotes: 1

JialeDu
JialeDu

Reputation: 9925

First, you must install everything from the Extension Pack for Java and the Language Support for Java(TM) by Red Hat extension.

Second, you have to make sure you open the correct project folder. Because VS Code takes the opened folder as the workspace, So pay attention to the folder hierarchy you open.

Upvotes: 1

Related Questions