Skip to content

Instantly share code, notes, and snippets.

@renatoargh
Last active February 5, 2024 17:49
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 renatoargh/8f403726b2323fb8c9a3e6d2c01892db to your computer and use it in GitHub Desktop.
Save renatoargh/8f403726b2323fb8c9a3e6d2c01892db to your computer and use it in GitHub Desktop.
Fazer o auto complete do Java funcionar no VSCode:

Fazer o auto complete do Java funcionar no VSCode:

  1. Instalar SDKMAN (https://sdkman.io/)
  2. Rodar sdk ls java e copiar o `identifier`` desejado (ultima coluna a esquerda)
  3. Rodar sdk install java :identifier
  4. Rodar sdk home java :identifier | pbcopy para copiar o local da instalação da versão especifica do Java (:javaPath) que vc instalou pelo sdkman
  5. No VSCode clicar em "Preferencer -> Settings", filtrar por "java.configuration.runtimes" então clicar em "Edit in settings.json" e colar o seguinte (substitua as variaveis):
  "java.configuration.runtimes": [
    {
      "name": "JavaSE-11", // De acordo com a versão instalada
      "path": ":javaPath",
      "default": true
    },
  ]
  1. Pressione "CMD+SHIFT+P" depois "Developer: Reload Window" para reiniciar o VSCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment