Why can i not run a.jar file on my raspberry pi?

I have java installed and the"java -jar minecraft_server.jar" doesn't work it comes back as…

bash: -jar: command not found

Any help!

How do you run this?

Don't think you need the -jar argument, just java minecraft_server.jar will do.

Bash (your shell) can't find the command java, probably because it is not installed. Install the java runtime. How to do this depends on what package manager you have installed and what the package name is.

Find out where the java executable is located and put that path in your PATH environment variable.

Sudo apt-get update && sudo apt-get install oracle-java7-jdk