Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Problem in passing an object class through socket

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem in passing an object class through socket

    I have a client server programm where each client can send a message to the others the problem in passing an object class through socket ,it goes well with the theory but when the server recieves the message there is an exception:

    line 186:
    [B]server: Data received in unknown format[/B ]

    catch(ClassNotFoundException classnot)
    {
    System.err.println("server: Data received in unknown format");
    }

    to run the program first you have to run the MultiChatServerObj with no pramaters and the the MultiChatObj at the following way:
    MultiChatObj name localhost
    like MultiChatObj james localhost

    I will be most thankfull if you find the error ,reading material on the subject doesn't help tried to put the class in a Vector and transmitt the Vevtor instead but it didn't help

    bye
    Attached Files Attached Files


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Problem in passing an object class through socket

    Was this answered on the other forum where you posted it?

Similar Threads

  1. Question about object passing to a method? My VOCAB sucks
    By tripline in forum Object Oriented Programming
    Replies: 6
    Last Post: October 28th, 2011, 12:48 PM
  2. passing object and storing
    By jack_nutt in forum What's Wrong With My Code?
    Replies: 15
    Last Post: June 30th, 2011, 09:32 PM
  3. Passing reference via object
    By Stefan_Lam in forum Java Theory & Questions
    Replies: 1
    Last Post: January 7th, 2011, 11:57 AM
  4. Sending object through socket
    By Alexandrinne in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 16th, 2010, 02:18 AM
  5. Replies: 0
    Last Post: April 11th, 2010, 08:56 AM