I Recently brought a MacBook Air m2 for development. I am facing issue in running java code through vscode if I run the same code through terminal command then it running properly

[![enter image description here](https://i.stack.imgur.com/Z4KLe.jpg)](https://i.stack.imgur.com/Z4KLe.jpg)