How do I select the Main class I want to run? #455
Unanswered
joaoLouceiro
asked this question in
Q&A
Replies: 3 comments
-
|
There are few issues with this reported before but here is what we do. We call this to get all main classes. I've noticed, when you create a new class, it's not automatically identified. You might have to close and reopen or compile the project again. nvim-java/lua/java-dap/setup.lua Line 88 in 011b521 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Building the workspace does not work for some stupid reason. The editor has to be closed and reopened. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
#459 fixes one of the issues |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think the print pretty much speaks by itself, but, either way, here's the scenario:
I have a folder called "wspace_test" (for "workspace).
I added 2 folders: test_a and test_b.
Each folder has it's own Main function.
How do I choose which Main to run?
You can see in the print below that the execution is always defaulting to my test_b/Main.
I think what used to happen (or at least what I'd expect to happen, as a user) is that the currently open class with a main function would be executed.
Now, it seems like it has something to do with the workspace config, but I can't wrap my head around what it could be.
If you're wondering about the original scenario, I have a project with multiple leetcode-style challenges. Each problem has it's own folder, identifying the name of the problem, and they all have a Solution.java acting like Main.
It used to work with no issue, meaning I could add a new folder, copy/paste the previous solution, change the code to adapt to the new challenge, :JavaRunnerRunMain and ta-da.
Now, it keeps defaulting to one instance of the Solution file, not sure why.
Best regards
Beta Was this translation helpful? Give feedback.
All reactions