Executing "Force Java compilation" from the command palette shows confusing error message
See original GitHub issueI get a Command 'Java: Force Java compilation' can not be run from here.
error dialog when I execute force Java Compilation on a multi-root project. Although it looks like the compilation seems to execute.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why this error occurs while trying to run java in vs code?
if the error is while "running the code", it's quite obviously not a compiler-error. You don't show any code, nor do you show...
Read more >picocli - a mighty tiny command line interface
Implement Runnable or Callable and your command can be executed in one line of code. The example main method calls CommandLine.execute to parse ......
Read more >Problems with the CANSparkMax in Visual studio code - Java
If the code compiles with the CANSparkMax import, it's a vscode issue. If it doesn't, then it's likely a vendor dependency issue. Posting...
Read more >Unresolved compilation problem (with no explanation?). (Java)
In VS Code, this can be done by opening the command palette ( Ctrl + Shift + P ), searching for the Java:...
Read more >User and Workspace Settings - Visual Studio Code
On Windows/Linux - File > Preferences > Settings; On macOS - Code > Preferences > Settings. You can also open the Settings editor...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok so this is not a multi-root problem. The problem is caused by the server build failing , eg. due to compilation errors, then the promise is rejected L197:
https://github.com/redhat-developer/vscode-java/blob/2a993d38e8e4f7c2ed454b8266df13d1fd88e863/src/extension.ts#L181-L202
When the command results fails, when launched from the command palette, vscode reports it couldn’t run the command. When launched from a shortcut, rejected promise is ignored. Not sure what the best way is to deal with that. @ansyral any idea?
It should be made more obvious, that there was a build error. Because I never thought of that. I though my installation is messed up