
You have code dangling out where it doesn't belong, neither in a method, nor constructor, nor initializer block. Or launch VS Code Quick Open ( Ctrl + P ), paste the following command, and press enter. Instead, you should compile first and fix all compilation errors before trying to run your code.Īs for your specific problem, your curly braces don't go around your main method body, and your class is missing a closing brace. Regelmäßige Eingaben: Unresolved compilation problem Java Basics - Anfänger-Themen: 7: 3. Open VS Code and press F1 or Ctrl + Shift + P to open command palette, select Install Extension and type vscode-java-debug. Try either renaming the file to app. This means that you're trying to run code that won't compile, something that you should never do. It looks like you’re having a file with a name test1.java, but the java compiler requires that the file name matches the name of the public class inside.
