Solved

ServerSocket and SSLServerSocket

Posted on 2006-12-02
2
353 Views
Last Modified: 2006-12-02
dear all,

i'm trying to change from ServerSocket to SSLServerSocket but i got the error message :

 javax.net.ssl.SSLServerSocket is abstract; cannot be instantiated
        SSLServerSocket ss= new SSLServerSocket(port);
                            ^

here is what i want to change :

 ServerSocket ss = new ServerSocket(port);    change to ==>        SSLServerSocket ss= new SSLServerSocket(port);
       
is it possible to change? if can not what is the solution to do this work?
0
Comment
Question by:ikhmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 500 total points
ID: 18059228
SSLServerSocketFactory factory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket socket = (SSLServerSocket) factory.createServerSocket(port);
0
 

Author Comment

by:ikhmer
ID: 18059368
thank You!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 264
Desingning Refactoring existing code 2 45
swing controls 2 37
Tomcat 9 + java 8 error while trying to deploy a war file 2 849
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question