Reputation: 6159
I have used the following command
Java –jar Jenkins.war
Error occurred:
Picked up _JAVA_OPTIONS: -Xmx512M
Error: Could not find or load main class ?jar
Upvotes: 2
Views: 477
Reputation: 16346
Looks like you have copy-pased the command from the internet, cause the –
character before jar isn't an actual dash, it is a special unicode character that looks similar to an dash, but isn't (thank you Microsoft). To be more specific it is the character en-dash (U+2013).
So if you replace the incorrect dash with the correct one -
, the command will work:
Java -jar Jenkins.war
Note that you might need to type this yourself since some browsers (looking at you IE) may auto convert to incorrect characters!
Upvotes: 3