Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Do Java Files Not Run If I don't have a folder open in VSCode #2242

Closed
ghost opened this issue Dec 4, 2021 · 2 comments
Closed

Why Do Java Files Not Run If I don't have a folder open in VSCode #2242

ghost opened this issue Dec 4, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 4, 2021

I am new to Java, and wanted to get started in VSCode. I ran my first Java file only to see that the terminal didn't open. Like it had the little run thingy on the top but the terminal didn't open and I couldn't see my file working.

I had happened to my .java file in some folder than uploaded that to VSCode, then ran that and that worked. Then I tried to run a .java file in VSCode even if it wasn't in the uploaded file, and that worked too. But when I close the uploaded folder and try to run the .java file and yeah it didn't work. Help please?

The code is something really simple. Like this for example.

public class stuff {
    public static void main(String[] args) {
        System.out.println("this is a test lol");
    }
}
Environment
  • Operating System: Windows
  • JDK version: 17.0.1
  • Visual Studio Code version: 1.62.3
@testforstephen
Copy link
Collaborator

Duplicates with #2231, there is a regression about single file support (no folder opened in VS Code).

The CI build https://download.jboss.org/jbosstools/jdt.ls/staging/java-1.2.0-470.vsix has fixed it, you can install from vsix.

Another workaround is to open a folder containing your Java files on VS Code.

@rgrunber
Copy link
Member

Closing as the duplicate issue was addressed. Should be fixed in 1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants