0

so i have stored my jar file in C:\Java\jdk1.6.0_26-32\jre\lib\ext

is the following command correct:

Java -cp C:\Java\jdk1.6.0_26-32\jre\lib\ext\bsh-2.0b4.jar

It does not seem to run the jar file

PS: please provide helpful notes instead of simply downvoting the question, i'm still new to this site. thanks.

gabybaby
  • 45
  • 1
  • 7
  • did you try running directly C:>C:\Java\jdk1.6.0_26-32\jre\lib\ext\bsh-2.0b4.jar – Satish Jan 15 '13 at 21:02
  • running my original command gives me a lot of options like `-jrockit -classpath -agentlib` etc...nothing is launched – gabybaby Jan 15 '13 at 21:03
  • @Satish running it directly like you mention returns that is not recognized as an internal or external command, operaable program or batch file – gabybaby Jan 15 '13 at 21:06

1 Answers1

0

A search for "running a jar file command line" yield this link (http://www.javaworld.com/javatips/jw-javatip127.html) saying to run this command: java -jar myjar.jar

Running java -help yields more information, and online documentation will explain all your command-line options to you (such as Oracle's java command documentation).

MonkeyWithDarts
  • 755
  • 1
  • 7
  • 17