Skip to content
Advertisement

Add tests to java classpath vscode

This is my current setup:

JavaScript

I want to be able to run the tests, but VSCode doesn’t detect them:

vscode capture

I have tried creating the following .classpath, but still doesn’t work:

JavaScript

I can run the test in the terminal using:

JavaScript

Advertisement

Answer

Update:

There is another more convenient approach: You can configure the classpath of your project if it is a project without build tool support (aka unmanaged folder) by triggering the command Java: Configure Classpath.


You can try right click the folder test and select Add Folder to Java Source Path

enter image description here

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement