question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Executing "Force Java compilation" from the command palette shows confusing error message

See original GitHub issue

I 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:open
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
fbriconcommented, Feb 15, 2018

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?

0reactions
mojo2012commented, Jun 5, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found