• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

ConnectionException under Win ME

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My assignment works fine under Win XP and Win 2000. Under Win 98 and Win ME it gives an error. It was showing up as an IOException at first but that was only because RemoteException is a type of IOException. Turns out, it can create the registry OK by it can't register the server in it. I've copied my code below:
LocateRegistry.createRegistry(Integer.parseInt(port));
System.out.println("registry started:" + symbolicName);
Naming.rebind(symbolicName, this);
I see the message, but then I get a ConnectionException Connection Refused to host.
Can anyone tell me what I'm doing wrong?
ms
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does symbolicName have the port number in the String.
I found this in the API Documentation

Each method of the Naming class takes as one of its arguments a name that is a java.lang.String in URL format (without the scheme component) of the form:
//host ort/name

where host is the host (remote or local) where the registry is located, port is the port number on which the registry accepts calls, and where name is a simple string uninterpreted by the registry. Both host and port are optional. If host is omitted, the host defaults to the local host. If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses.


Most importantly this part.

If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses.


That's my guess.
btw, I used the default port 1099.
Mark
 
I'm so happy! And I wish to make this tiny ad happy too:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic