Skip to content

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

Open
@Nacandcheese

Description

@Nacandcheese

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions