As a first step, try to compile your programm from te command line. E.g.
How do I run a Java program from the command line on Windows? is a good start. You can run the commands directly in VSCode's integrated terminal.
Optionally, create a VS Code build task from that command to run builds with the build command.
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Foo",
"type": "shell",
"command": "javac foo.java",
"problemMatcher": []
}
]
}
To run/debug, create a launch config in the debug viewlet, for example:
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch)-Foo",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "Foo",
"args": ""
},
{
"type": "java",
"name": "Debug (Attach)",
"request": "attach",
"hostName": "localhost",
"port": 0
}
]
}