Kyo Akashi
Kyo Akashi

Reputation: 223

Starting .jar with cmd or batch

I got my "EntityGenerator.jar" but if I type

java -jar EntityGenerator.jar

in the command line I got this:

Unable to access to enter jarfile EntityGenerator

or when I type this:

java EntityGenerator

this error comes up:

Main class could not be found or loaded

also I want to execute this by having a batch file.

Thank you for your help

Upvotes: 0

Views: 67

Answers (2)

Kyo Akashi
Kyo Akashi

Reputation: 223

Sorry it was easier than i thought! I just didnt read right, he couldn't find the XML File. Now that i placed them together it works fine!

Upvotes: 0

Marios
Marios

Reputation: 1957

  • try to provide the full path of the jar.
  • In order to create a batch file, just put the command inside a text file and rename that file to have ".bat" suffix

Upvotes: 2

Related Questions