Ryan Setzer
Ryan Setzer

Reputation: 29

No easy run button when using Java in VS Code

I am a software developer and am having a problem with Visual Studio Code while trying to run Java. When running other languages (such as python) there is a green triangular button on the top right that allows an easy way to run my code, however, when I trying running Java there arrow is not there and I have to manually select "Run Code" from the "Run" ribbon at the top of the screen. Is there any way that I could get the same green run button when using Java? Thank you for your time.

Upvotes: 1

Views: 4868

Answers (2)

Molly Wang-MSFT
Molly Wang-MSFT

Reputation: 9511

Install Java Extension Pack in extension marketplace will solve your question, also you can install Code Runner which provides button for code running too. enter image description here

Upvotes: 2

TheLegend42
TheLegend42

Reputation: 71

Press crtl+F5 to run without debugging and F5 running with debugger. You can use the integrated terminal for compiling and executing by using the javac <filename>.java for compiling and java <filename> for executing.

Set your own key bindings.

Preset shortcuts

Upvotes: 2

Related Questions