Install SSL in JRE under Glassfish


Today there was an urgent requirement for implementing ssl in JRE for internal use so done below things and it worked.

Type the https url for which we want to install CER in JRE in Glassfish. And open certificate details from URL

Go in Details tab and click on “COPY to File”


Click Next .. Provide file name for CER to save and …. Click Finish

Now open ssh for Ubuntu on which Glassfish is installed

Create directory cert on /root

Copy the CER file created from browser to it

Now traverse the glassfish folder path

You will find cacerts.jks file in domain1 folder



Now type below command on # prompt

keytool -list -keystore cacerts.jks

It will show

You see currently keystore “cacerts.jks” holds 76 certificates


keytool -import -keystore cacerts.jks -file /cert/cert.cer

Now this will print details about certificate and ask you for confirmation of adding certificates:


Trust this certificate? [no]:  y

Certificate was added to keystore


That’s all

Now restart the domain and SSL in JRE will start working


Prashant Deshpande





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s