Skip to content

Instantly share code, notes, and snippets.

@darragh-murphy
Last active November 27, 2020 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darragh-murphy/8a051f089fa9a8b6315fd5ebf009bb7a to your computer and use it in GitHub Desktop.
Save darragh-murphy/8a051f089fa9a8b6315fd5ebf009bb7a to your computer and use it in GitHub Desktop.
Visual Studio Code (VsCode) Java 11 Warning Fix
Add the "setting" section to your workspace settings.json file. (C:\<path to projecT>\<PROJECT>.code-workspace)
{
"folders": [
{
"path": "."
}
],
"settings": {
"java.configuration.updateBuildConfiguration": "automatic",
"java.home": "C:\\<path to jdk parent folder>\\OpenJDK11U-jdk_x64",
"boot-java.boot-hints.on": true,
"maven.terminal.customEnv": [
{
"environmentVariable": "MAVEN_OPTS", // variable name
"value": "-Xms512m -Xmx512m" // value
},
{
"environmentVariable": "JAVA_HOME", // variable name
"value": "C:/<path to jdk parent folder>/jdk1.8.0_40" // value
}
],
"maven.view": "hierarchical",
"java.format.settings.url": "eclipse-formatter.xml",
"files.exclude": {
"target": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"html.format.wrapLineLength": 200,
"workbench.tree.indent": 4,
"files.autoSave": "afterDelay",
"editor.detectIndentation": false,
"window.titleSeparator": "",
"window.title": "“${activeEditorLong}${separator}${rootName}”",
"java.completion.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.*"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment