Skip to content

Unable to run multiple Java projects/files #2977

Closed

Description

@GregoryLi360

VS Code Version: 1.76.0
OS Version: MacOS 13.1

Steps to Reproduce:

  1. Install Red Hat Java extension
  2. Click the run button in the top right
  3. Select which Java file to run
  4. Click the run button again

Current Behavior:
The same selected file runs over and over again, even when running in a file with a main method.

Expected Behavior (pre-update):
You are allowed to select which file to run again, or if the current file has a main method, it is ran instead.

Activity

  1. testforstephen commented on Mar 6, 2023

    @testforstephen
    Collaborator

    @GregoryLi360 Could you share a sample project (including launch.json if it exists) to help us reproduce the issue?

  2. GregoryLi360 commented on Mar 6, 2023

    @GregoryLi360
    Author

    @testforstephen Just having 2 java files with main methods and a third java file without a main method can recreate the issue.

  3. testforstephen commented on Mar 7, 2023

    @testforstephen
    Collaborator

    Expected Behavior (pre-update):
    You are allowed to select which file to run again, or if the current file has a main method, it is ran instead.

    We tuned the run behavior in latest debugger version. If the current file has a main method, it still ran directly. However, if it does not have a main method, then the last run of the main class will be automatically selected. this is by design.

  4. GregoryLi360 commented on Mar 7, 2023

    @GregoryLi360
    Author

    Sad :( wish there was an option to turn it back

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions