.jar files are not executing in terminal

I am an absolute beginner I have countered the error message as shown in the screen shot.
when I open .jar file in terminal, it doesn’t show $ sign and when I write -jar it just shows an error.
If anyone could assist

Many Thanks!

When Mosh shows the terminal you’ll see things like this…

codewithmosh $ls

But Mosh didn’t type in the $, that’s just part of his command prompt. He only typed ls. Try typing just ls and you’ll see what I mean.

So, run your commands without the $. But… I think you might run into a couple of other problems as well. You’re not in the directory that has your jar file, and also the name that you’ve typed doesn’t match the name of your jar file. So watch out for those sorts of things.

Hi eelsholz
you helped me a lot Thank you so much for your guidance.
I worked without typing $ sign. It didn’t work in the original HelloWorld1 programme but when I make a new programme I worked…
Thank you so much…