?
Solved

ServerSocket and SSLServerSocket

Posted on 2006-12-02
2
Medium Priority
?
359 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 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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

771 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