redhat-developer / redhat-developer/vscode-java

_ is not on the classpath of project _, only syntax errors are reported

Aperta
#1,886 19 commenti 7 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Every time I try to create a package for my java classes so I can finish my projects for school, errors like this occur:
image
When I finally try to run the program, I get an even more infuriating message:
image
It hurts me to be unable to properly test my code, even if I know I did well. It has been giving me anxiety for quite a while now, so I'm quite surprised this has slipped under the radar for so long.

  • Operating System:
    image

  • JDK version: 15.0.2

  • Visual Studio Code version:
    image

  • Java extension version:
    image
    image

Steps To Reproduce

  1. Create a java class with methods and everything.
  2. Put it in a folder with a test program.
  3. List the folder as a package in both programs.
  4. Try to use the class and it's methods in the test program. Both errors should be clearly visible by now.

Here is my code as an example of what can cause it. Try compiling either Test.java or Customer.java and it should be quite apparent.
Chapter10.zip

Current Result

A warning that constantly results in weird compiler errors

Expected Result

A working class that I can use

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 aprendo l’archivio allegato Chapter10.zip e riproducendo il report con Test.java e Customer.java in VS Code usando JDK 15.0.2. Verifica come l’estensione Java gestisce la configurazione di package e classpath. Il lavoro è completato quando l’avviso di classpath è stato risolto e le classi di esempio vengono compilate ed eseguite come previsto.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.