jdtls exited with status code 1
homimickey opened this issue · comments
Homi Mickey commented
Raoul Wols commented
Any hints in the log panel? Run LSP: Toggle Log Panel from the command palette.
Raoul Wols commented
Also, please run LSP: Troubleshoot Server with jdtls.
Homi Mickey commented
when i downloaded new java (JAVA 16) and JAVA_HOME
variable is set accordingly and now works like a charm.
I think the older java version java(1.8) was causing a problem
Thanks...
Homi Mickey commented
Any hints in the log panel? Run LSP: Toggle Log Panel from the command palette.
jdtls: Unrecognized option: --add-modules=ALL-SYSTEM
jdtls: Error: Could not create the Java Virtual Machine.
jdtls: Error: A fatal exception has occurred. Program will exit.
This was the logs whrn i ran LSP: Toggle Log Panel
using Java (1.8)
Homi Mickey commented
Also, please run LSP: Troubleshoot Server with jdtls.
It messes up when i use java (1.8)
Attaching Troubleshooting:jdtls
Hope it helps ✌✌
Troubleshooting: jdtls
Version
- LSP: 1.8.0
- Sublime Text: 4113
Server Test Run
- exit code: 1
- output
Unrecognized option: --add-modules=ALL-SYSTEM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Server Configuration
- command
[
"${java_executable}",
"--add-modules=ALL-SYSTEM",
"--add-opens",
"java.base/java.util=ALL-UNNAMED",
"--add-opens",
"java.base/java.lang=ALL-UNNAMED",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
"-Dfile.encoding=UTF-8",
"-DwatchParentProcess=${watch_parent_process}",
"-noverify",
"-XX:+UseParallelGC",
"-XX:GCTimeRatio=4",
"-XX:AdaptiveSizePolicyWeight=90",
"-Dsun.zip.disableMemoryMapping=true",
"-Xmx1G",
"-Xms100m",
"-jar",
"${serverdir}/plugins/org.eclipse.equinox.launcher_${launcher_version}.jar",
"-configuration",
"${serverdir}/config_${jdtls_platform}",
"-data",
"${datadir}"
]
- shell command
"D:\Program Files\Java\jdk-1.8\bin\java" --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=UTF-8 -DwatchParentProcess=false -noverify -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -jar "C:\Users\ravit\AppData\Local\Sublime Text\Package Storage\LSP-jdtls\server\1.4.0-202108202239/plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar" -configuration "C:\Users\ravit\AppData\Local\Sublime Text\Package Storage\LSP-jdtls\server\1.4.0-202108202239/config_win" -data "C:\Users\ravit\AppData\Local\Sublime Text\Package Storage\LSP-jdtls\data"
- selector
source.java
- priority_selector
source.java
- init_options
{}
- settings
{
"java": {
"autobuild": {
"enabled": true
},
"codeGeneration": {
"generateComments": false,
"hashCodeEquals": {
"useInstanceof": false,
"useJava7Objects": false
},
"toString": {
"codeStyle": "STRING_CONCATENATION",
"limitElements": 0,
"listArrayContents": true,
"skipNullValues": false,
"template": "\\${object.className} [\\${member.name()}=\\${member.value}, \\${otherMembers}]"
},
"useBlocks": false
},
"completion": {
"enabled": true,
"favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*"
],
"filteredTypes": [
"java.awt.*",
"com.sun.*"
],
"guessMethodArguments": false,
"importOrder": [
"java",
"javax",
"com",
"org"
],
"maxResults": 0,
"overwrite": true
},
"configuration": {
"checkProjectSettingsExclusions": true,
"maven": {
"globalSettings": null,
"userSettings": null
},
"runtimes": [],
"updateBuildConfiguration": "interactive"
},
"contentProvider": {
"preferred": null
},
"errors": {
"incompleteClasspath": {
"severity": "warning"
}
},
"foldingRange": {
"enabled": false
},
"format": {
"comments": {
"enabled": true
},
"enabled": true,
"onType": {
"enabled": false
},
"settings": {
"profile": null,
"url": null
}
},
"home": null,
"implementationsCodeLens": {
"enabled": true
},
"import": {
"exclusions": [
"**/node_modules/**",
"**/.metadata/**",
"**/archetype-resources/**",
"**/META-INF/maven/**"
],
"gradle": {
"arguments": null,
"enabled": true,
"home": null,
"java": {
"home": null
},
"jvmArguments": null,
"offline": {
"enabled": false
},
"user": {
"home": null
},
"version": null,
"wrapper": {
"enabled": true
}
},
"maven": {
"enabled": true
}
},
"imports": {
"gradle": {
"wrapper": {
"checksums": []
}
}
},
"maven": {
"downloadSources": false,
"updateSnapshots": false
},
"maxConcurrentBuilds": 1,
"progressReports": {
"enabled": true
},
"project": {
"importHint": true,
"importOnFirstTimeStartup": "interactive",
"referencedLibraries": [
"lib/**/*.jar"
],
"resourceFilters": [
"node_modules",
".git"
]
},
"refactor": {
"renameFromFileExplorer": "prompt"
},
"references": {
"includeAccessors": true
},
"referencesCodeLens": {
"enabled": true
},
"saveActions": {
"organizeImports": false
},
"selectionRange": {
"enabled": true
},
"semanticHighlighting": {
"enabled": false
},
"server": {
"launchMode": "Hybrid"
},
"showBuildStatusOnStart": {
"enabled": false
},
"signatureHelp": {
"enabled": true
},
"sources": {
"organizeImports": {
"starThreshold": 99,
"staticStarThreshold": 99
}
},
"templates": {
"fileHeader": [],
"typeComment": []
},
"trace": {
"server": "off"
}
}
}
- env
{}
Active view
- File name
E:\java-programs\Myclass.java
- Settings
{
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": true,
"syntax": "Packages/Java/Java.sublime-syntax"
}
- base scope
source.java
Project / Workspace
- folders
[
"E:\\java-programs"
]
- is project: False
LSP configuration
{
"clients": {
"jdtls": {
"enabled": false
}
}
}
System PATH
- C:\Program Files\Common Files\Oracle\Java\javapath
- C:\Program Files (x86)\Common Files\Oracle\Java\javapath
- D:\Program Files\Java\jdk-1.8\bin