Cannot Start RMI Server

Hi,

I am trying to start my run my RMI server that i have created, but seem to be unable to even start the server. I did start the rmiregistry and then attempt to start my server. Btw, i used msdos to start my rmiregistry and to start my server.

My friend has tried the coding and it works on his computer. I am thinking that it is my computer configuration but i do not know where exactly is the problem.

Here are some of the errors:

java.net.ConnectException: Connection refused: connect

at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)

at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)

at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)

at sun.rmi.server.UnicastRef.newCall(Unknown Source)

at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

at java.rmi.Naming.rebind(Unknown Source)

at addRmi.AddServerApp.main(AddServerApp.java:10)

by: java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S

[1580 byte] By [shaoen01a] at [2007-10-3 4:37:55]
# 1
It is the URL that you are providing to Naming.rebind(). It probably doesn't name the localhost.
ejpa at 2007-7-14 22:41:41 > top of Java-index,Core,Core APIs...
# 2
Maybe port is being uesd.You can change other port and try again.
yulongzhua at 2007-7-14 22:41:41 > top of Java-index,Core,Core APIs...
# 3
@OP: it is definitely not a port-in-use problem.
ejpa at 2007-7-14 22:41:41 > top of Java-index,Core,Core APIs...
# 4
Why so definitely not? if port in use, the same problem would appear. I make this problem yesterday, and change default port to 2002 or other port, it run normolly.
yulongzhua at 2007-7-14 22:41:41 > top of Java-index,Core,Core APIs...
# 5
If the port is already in use you get a BindException. This is a ConnectException which indicates nobody is using the port at all.
ejpa at 2007-7-14 22:41:41 > top of Java-index,Core,Core APIs...