-1

Trying to register mail certificate for TLS authentication:

keytool -import -file C:\Users\martin\"Automation Projects"\RemedySOAPWebService\src\resources\mail.cer -keystore "C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\security" -alias mail

Error:

C:\Program Files (x86)\Java\jdk1.8.0_121\bin>keytool -import -file C:\Users\martin\"Automation Projects"\RemedySOAPWebService\src\resources\mail.cer -keystore "C:\Program Files (x86)\Java\jdk1.8.0_121\jre\lib\security" -alias mail
Illegal option:  Projects\RemedySOAPWebService\src\resources\mail.cer -keystore C:\Program

I get this jumbled up error message. What's going on here?

Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
Martin Erlic
  • 5,467
  • 22
  • 81
  • 153

1 Answers1

2

You need to quote the directories that contain spaces.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • So how did you magically get past the keytool runtime error which you have now removed from your question and changed it to a completely different problem? – user207421 Mar 06 '17 at 14:37