wood burning stoves 2.0*
The moose likes Web Services and the fly likes How can i load keystore using java api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "How can i load keystore using java api" Watch "How can i load keystore using java api" New topic
Author

How can i load keystore using java api

Amr k. Saleh
Ranch Hand

Joined: Aug 23, 2010
Posts: 41
Hi All,

I'm using glassfish application server, how can i load the keystore ?

KeyStore keystore = KeyStore.getInstance("JKS");
InputStream is = new FileInputStream(new File("???"));
keystore.load(is, "changeit".toCharArray());

what is the path should i provide for the File ? i want to use the default keystore


thanks in advance,
Amr Khaled
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3833

Have a look at this on how to store, you can have a hint from that perhaps.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
GeeCON Prague 2014
 
subject: How can i load keystore using java api