redhat-developer / redhat-developer/vscode-java

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

Đang mở
#1,886 19 bình luận 7 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

classpath
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách mở Chapter10.zip đính kèm và tái hiện báo cáo bằng Test.java và Customer.java trong VS Code sử dụng JDK 15.0.2. Kiểm tra cách tiện ích mở rộng Java xử lý thiết lập package và classpath. Công việc được xem là hoàn tất khi cảnh báo classpath được giải quyết và các lớp ví dụ biên dịch, chạy đúng như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, vscode
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.