Skip to content

Failure to recognize new directory/path and run new java file within Java: Create Java Project #682

Description

@juliosegarra
Environment
  • Operating System: Windows 10
  • JDK version: 11.0.4
  • Visual Studio Code version: 1.38
  • Java extension version: 0.8.0
  • Java Debugger extension version: 0.22.0
Steps To Reproduce
  1. ctrl + shift + p to editor commands
  2. Select and run through Java: Create Java Project
  3. Add a new folder to src folder or app folder and then add a new java file to that new folder > try to run/debug said file
  4. When this error pops up:
    Error Message on bottom right of editor:
    Build failed, do you want to continue?
    Source: Debugger for Java (Extension)

Click Proceed.

  1. Error: Could not find or load main class test.Test
    Caused by: java.lang.ClassNotFoundException: test.Test
Current Result

Error Message on bottom right of editor:
Build failed, do you want to continue?
Source: Debugger for Java (Extension)

Proceed
Error: Could not find or load main class test.Test
Caused by: java.lang.ClassNotFoundException: test.Test

Expected Result

Recognize new folder within project and run file as normal.

Additional Informations

I'm sure I'm missing something but I did get it to recognize the new folder I created and run the java file within it AFTER I made seemingly any small change in the .classpath file and saving (reverting afterward of course).

Once I saved that change it seems it would then recognize that folder/file path and successfully run/debug the file in it.

Is there any other way to have new folder paths recognized?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions