Visual Studio Code - Java Classpath is incomplete. Only syntax errors will be reported : <p>I am making my first steps with java, after some extensive experiences with python. The script I am running is a simple Java Swing Gui, that compiles and runs fine from the command line and within VS Code. </p>

<p>To set up the java debug environment, I used the lauch.json settings suggested on the github site <a href="https://github.com/k--kato/vscode-javadebug" rel="noreferrer">https://github.com/k--kato/vscode-javadebug</a>. </p>

<p>Unfortunately, every time I open the folder that contains the script, I get the following error message: </p>

<pre><code>Warn: Classpath is incomplete. Only syntax errors will be reported.
</code></pre>

<p>I have no idea if the problem comes from within VS Code, of if it's some other configuration issue, such as the java set up....</p>

<p>My working platform is Linux Ubuntu, Gnome Shell. </p>

<p>Can anybody help? </p>

<p>This is the script: </p>

<pre><code>//file name = SimpleEx.java 

import java.awt.EventQueue;
import javax.swing.JFrame;

public class SimpleEx extends JFrame {

    public SimpleEx() {

        initUI();
    }

    private void initUI() {

        setTitle("Simple example");
        setSize(300, 200);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {

        EventQueue.invokeLater(() -&gt; {
            SimpleEx ex = new SimpleEx();
            ex.setVisible(true);
        });
    }
}
</code></pre>

<p>and this is my launch.json: </p>

<pre><code>{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Java",
            "type": "java",
            "request": "launch",
            "stopOnEntry": true,
            "cwd": "${fileDirname}",
            "startupClass": "${fileBasename}",
            "options": [
                "-classpath",
                "${fileDirname}"
            ]
        },
        {
            "name": "Java Console App",
            "type": "java",
            "request": "launch",
            "stopOnEntry": true,
            "cwd": "${fileDirname}",
            "startupClass": "${fileBasename}",
            "options": [
                 "-classpath",
                 "${fileDirname}"
            ],
            "externalConsole": true
        }
    ]
}
</code></pre>
