Java chat program, works on single PC, but not over internet?

Discussion in 'Java' started by rolls, Mar 12, 2009.

  1. rolls

    rolls New Member

    Joined:
    Mar 12, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I got bored so I started writing a chat client in java, its IRC style, a server and as many clients as you want. It works fine on a single computer (using 127.0.0.1 as the IP) but not over the internet.

    I've tried running the server and client on my home PC, set up the ports to be forwarded on my router and enabled them in the windows firewall but I get the error "Connection refused" when trying to connect using my external IP (ISP) address, same with me running the server and a mate running the client.

    The class chatHandler was basically stolen off the internet, the rest I wrote myself or modified bits of code to suit. I wrote it in netbeans with the GUI builder.

    I've hosted both projects in the single zip, if you want to run the application just open the .jar file in the dist folders, or view the source via the src folder, or alternatively you can load the project up in NetBeans so its easier to play with the GUI.

    So yeah if anyone can help me out with why its not working that'd be great, I've added the port to my firewall (default 60111). My ultimate goal is to implement an actual protocol so it isn't just sending plain text, then I can easily send files to mates etc.

    The file uploaded is in RAR format but with a ZIP extension, this so was so I could upload it and keep it under 400kb.
     
    Last edited by a moderator: Mar 12, 2009
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Removed the attachment and Added the rar extension so now you can upload rar files as well.
     
  3. rolls

    rolls New Member

    Joined:
    Mar 12, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Heres the file again
     

    Attached Files:

  4. rolls

    rolls New Member

    Joined:
    Mar 12, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Yey I got it working, for some reason the person I was testing it with it didn't work for but it does with everyone else.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice