Solved

Cannot open socket - Listen fails

Posted on 2000-05-17
6
195 Views
Last Modified: 2010-04-01
i installed jdk2 and jsdk2.0 on win95. when i ran SERVLETRUNNER which comes with jsdk2.0 i get the following Exception

java.net.SocketException : Descriptor not a socket Listen failed.
with a stack trace printed out in Standard output

is there a problem with jvm i installed jrun and uninstalled as it too was not able to open a socket to listen.

Thanks
arun.
0
Comment
Question by:marun
[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
  • 4
6 Comments
 
LVL 7

Accepted Solution

by:
Ravindra76 earned 100 total points
ID: 2820101
Replace java.policy file

in c:\jdk2home\jre\lib\security

with



// Standard extensions get all permissions by default

grant {
      permission java.security.AllPermission;
};

Note:- c:\jdk2home is the directory where U actuallu installed JDK software
0
 
LVL 1

Expert Comment

by:tonus
ID: 2821165
Hi,
Generally Servletrunner is trying to connect to 8080 port. If that port is occupied by some other process, servletrunner won't start. Try changing the port of the servletrunner (setup files u will get in c:/jsdk2.0/examples) and run the servletrunner

bye
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2821237

Hi ,

It is not port problem.

If it is so, it will give already bind exception

If U still face, some problem

run Your servlets with this command

servletrunner -d c:\Yourdir -v

wher yourdir is the directory where U are wishing to run servlets.

Otherwise U have to put your servlets in c:\jdsk\examples

because servletrunner will run servlerts in c:\jsdk\examples
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:marun
ID: 2822597
when i installed java1.1 it worked but with jdk2 its not working what may be the problem.
    its not the port problem as  said by ravindra. ravindra security is all the same in the file u mentioned i checked it up but directory is too not the problem. please suggest another way to tackle the problem

thanks
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2822752

try first

1.ping localhost

      If it succeeds ,

2. Type ipconfig

3. Then try

      ping ipaddress

      where ipaddress is the system ip address given in ipconfig

If both failed means something problem in Your system networking drivers.

Reinstall TCP/IP drivers
0
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2822846

I will feel very happpy if U would have been rejected my answer than giving D grade.

Ok.

Bye
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

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 first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

617 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