SSLContext sc = SSLContext.getInstance("TLS");
KeyManagerFactory kmf =
KeyManagerFactory.getInstance("SunX509");
KeyStore ks = KeyStore.getInstance("jceks");
char[] password = args[1].toCharArray();
ks.load(new FileInputStream(args[0]), null);
kmf.init(ks, password);
sc.init(kmf.getKeyManagers(), null, null);
ServerSocketFactory ssf = sc.getServerSocketFactory();
ServerSocket ss = ssf.createServerSocket(9096);
while (true) {
new SSLSimpleServer(ss.accept()).start();
}