Solved

Cannot open socket - Listen fails

Posted on 2000-05-17
6
187 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
  • 4
6 Comments
 
LVL 7

Accepted Solution

by:
Ravindra76 earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:marun
Comment Utility
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
Comment Utility

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
Comment Utility

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

Ok.

Bye
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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:

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now