Hot questions for Using GlassFish in keytool

Question:

I've been for several days trying to effectively implement HTTPS in a Glassfish server I work with, but it's just becoming impossible.

I'm trying to generate a key, and then generate a CSR to add it to my GlassFish server, and have a signed certificate to my HTTPS (now I have an untrusted certificate).

I enter in my Java folder, and run this command:

keytool -genkey -keystore keystore1.jks -alias newkey -storepass changeit -keypass changeit

It always retrieves the error you see in the title, saying that it cannot find the specified route. I tried many other routes:

C:\keystore1.jks .\keystore1.jks ..\keystore1.jks

... yet nothing works. It just keeps retrieving the same error, so I can't do anything.

What can I do?


Answer:

The problem is there is no access for write in your Java directory.

When I issued your command in my home directory - file was generated, after switching to Java bin dir (where keytool is located) I got FileNotFoundException.