redhat-developer / redhat-developer/vscode-java

Project does not build due to build path being incomplete

Aperta
#1,595 21 commenti 11 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

compile runtime
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

None of my Java projects are being built properly by the language server.

All my projects are failing, even previously working projects

Fundamentally, I'm getting JRE errors such as The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files.

I'm unable to open standalone Java files, vanilla Java projects and packages, or Maven projects properly.

Here are some things I've tried:

  • Cleaned and restarted the language server workspace multiple times.
  • Set up the runtimes properly according to the guide.
  • Set JAVA_HOME, java.home to jEnv symlinks .jenv/versions/14.0 and directly to the JDK installations themselves /usr/local/Cellar/openjdk/14.0.1/.
  • Repeated the above steps with Java 11 and Java 14.
  • Repeated the above steps with Java 11 Homebrew Cask installation of OpenJDK /Library/Java/JavaVirtualMachines/...
  • Full wipe of VSCode and reinstalled everything, with the same results.
Additional Informations

I'm using jenv to manage my JDKs, and I've enabled the export and maven plugins. Compilation with javac and running with java works just fine.

Environment
  • Operating System: macOS 10.15.6
  • JDK version: 11.0.8, 14.0.1
  • Visual Studio Code version: 1.48.2
  • Java extension version: 0.65.0
Steps To Reproduce
  1. Open a new .java file and define a class.
Log files

redhat.java/client.log.2020-08-26
client.log

Current Result

Plugin is unable to find JRE classes which causes compilation errors for the server.

Expected Result

Plugin should be able to link to JRE classes and compile properly, providing Intellisense without any errors.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il log referenziato redhat.java/client.log.2020-08-26 e riproduci il problema aprendo un nuovo file .java autonomo, quindi traccia il motivo per cui il language server non riesce a collegare le classi JRE. Il lavoro è completato quando i file autonomi, i progetti vanilla e i progetti Maven vengono compilati con IntelliSense e senza errori di risoluzione JRE.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.