Java server crashed 5 times in last 3 minutes
I am getting below error message for java application
The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.
Source: Language Support for Java(TM) by Red Hat (Extension)
Environment
- Operating System: Mac OS Mojave
- JDK version: java version "1.8.0"
- Visual Studio Code version: Version 1.28.2 (1.28.2)
- Java extension version:
Steps To Reproduce
- During first Java application activation
@toramanan Is this the first time that you are using vscode java to open the application or the project was opened before?
This is happening every time the plugin is trying to load when I add a Java app folder to the workspace. Since the plugin is crashing, it is not recognizing Java app, so it is more of a text editor for java apps.
I tried the latest versions and few previous versions for Mac and I am still getting the issue.
JDK_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
BTW. It is working fine for Windows, the issue seem to be only in Mac OS.
Try to check if there are running org.eclipse.equinox.launcher_*.jar Java processes running (using jps), if you find some, kill them all. Then try again.
There is no other java process running. JPS just gave me the pid of its own process.
I cleaned up workspaceStorage and extenstions folder. Reinstall VS Code, and still the same issue. I am not even able to open "Java: Open Java Language Server Log file" from the command palette. I changed java.trace.server=verbose, but no use since not able to open the server log file. Is there a location for the log file, I am not able to find that the workspaceStorage. All I have is a meta.json file.
The standard "Developer: Toggle Developer Tool" is giving the below log in the chrome console.
The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted.
t.onDidNotificationChange @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2374
Looks like after my OS X upgrade, something messed up my Java. I had to re-install JDK and I installed 11 this time and it is working fine now. Thank you.