[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

Java RMI chat Program Errors!!!

Hi,
I used the chat application on this link http://www.cs.umd.edu/class/spring2001/cmsc433-0101/ 
to produce a simple console text rmi chat application. But the following errors resulted and unable to resolve it.
C:\mycodes\ChatApplication> javac serverimpl\ServerImpl.java
uses unchecked or unsaved operations. Recompile with -Xlint:unchecked for details.
I decided to supress the warning and got it compiled successfully. The rmiregistry and the server "ServerImpl "started successfully also.
However, the client on "ClientImpl" compiled without errors but when i tried to run it with java -Djava.security.policy=policy.txt clientimpl.ClientImpl then it reported the following errors
Exception in thread "main" java.lang.ArrayIndexOutOfBoundExceptions: 0 at clientimpl.ClientImpl.main(ClientImpl.java:28)

I need your urgent assistance to get this application working.

Thanks

ChatApplication.zip
0
woodquest
Asked:
woodquest
  • 3
  • 2
1 Solution
 
objectsCommented:
it expects the login name to be specified on command line

java -Djava.security.policy=policy.txt clientimpl.ClientImpl loginname
0
 
woodquestAuthor Commented:
Thanks, you guys are great!
0
 
woodquestAuthor Commented:
This application sends message to everyone in the chat room.
I want a modification to this application in such a way that a client can see other logged in clients and can choose whoever he wants to chat with from the list.

Thanks
0
 
objectsCommented:
thats not a trivial change, would need to implement both the ability to control who messages are sent to and also the ui to display who's logged in and select who to send to
0
 
woodquestAuthor Commented:
I'm very pleased with your level of assistance so far.
I started this question in a new thread because of its urgency.
However, I rely on you for solutions to implement both the ability to control who messages are sent to and also the ui to display who's logged in and select who to send to.

Thank you
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now