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.
2
Answers
I have found the solution, by adding
-Xlog:jni+resolve=off
tojava.jdt.ls.vmargs
and it's solvedFirst, 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.