Connection refused

Hi,

first of all I'm sorry for asking another question on the exception

Connection refused to host: localhost; nested exception is:

java.net.ConnectException: Connection refused: connect

but until now i read several hours on many tutorials and forums and i tested many variants but it still doesn't work.

Server:

System.setSecurityManager(new RMISecurityManager());

Naming.rebind("correlator",new Correlator());

start server:

java -Djava.security.policy=java.policy -Djava.rmi.server.codebase=file:/c:\workspace\Correlator/ -Djava.rmi.server.hostname=localhost de.protone.Correlator

in the hostname-property i tried several things, for example localhost, ip-address, full host name, 127.0.0.1

Client:

System.setSecurityManager(new RMISecurityManager());

CorrelatorImpl impl = (CorrelatorImpl)Naming.lookup("correlator");

impl.setRuleSet(sActlFile);

java -Djava.rmi.server.codebase=file:/c:\workspace\Correlator/

-Djava.security.policy=java.policy de.protone.RuleSetTer

in the Naming.lookup() function i tried for example rmi://localhost:1099/correlator, correlator, //localhost:1099/correlator,...

but no combination works for me

my policy file is filled with:

grant {

permission java.security.AllPermission;

};

it's the file from the jre\lib\security-path

(could it be a path-problem with the policy-file at the client-side? where has this file to be?)

thanks a lot for help

[1694 byte] By [zcoa] at [2007-10-3 3:52:03]
# 1
rebind and lookup using the correct url://host:<port>/correlatoror rmi://host:<port>/correlator<port> defaults to 1099
aranzugliaa at 2007-7-14 21:49:47 > top of Java-index,Core,Core APIs...
# 2
Hi, thanks for your reply. But that wasn't the problem. In the post for the same problem from Rocco123456789 you asked him if he "exit the program on the server class using System.exit()". And this was the problem. I did it for testing purposes.Thank you very much :)
zcoa at 2007-7-14 21:49:47 > top of Java-index,Core,Core APIs...
# 3
glad to help, it took me hours to see that this System.exit() were my problem
aranzugliaa at 2007-7-14 21:49:47 > top of Java-index,Core,Core APIs...