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 3 of 3

Thread: Simple Lan connection in Java

  1. #1
    Member
    Join Date
    Dec 2013
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Simple Lan connection in Java

    Hello

    Now that I found that there is a section for "networking" I know i'm posting in the right place.
    Last semester in university I successfully made a graphical chess game (thanks to some people on this forum) in java as my end of term project for programming.
    This term I have an option of adding LAN networking to my project .

    Question: How hard would something like this be?
    I've never done anything like that in any programming language so I don't know how difficult/easy it is to do.
    Could someone perhaps guide me along the right path here or at least throw some links to materials that I should read before
    I attempt to do this?

    The requirements are that when I start my program I will have a small window in my gui where I will input the port/IP adress and that stuff to connect to another computer on a lan network
    after which the game will start like a normal 1v1 chess game.

    Thanks in advance.


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

    Default Re: Simple Lan connection in Java

    If you are working with IP addresses and ports, take a look at using the ServerSocket and Socket classes.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Dec 2013
    Posts
    37
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Simple Lan connection in Java

    Ok that's a start , I'll take a loot at that , thanks .

Similar Threads

  1. [SOLVED] Lan networking in Java
    By Att1li in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: February 18th, 2014, 04:36 PM
  2. Disable my LAN connection programmatically
    By sakura in forum Java Theory & Questions
    Replies: 1
    Last Post: October 17th, 2013, 06:41 AM
  3. Replies: 1
    Last Post: March 17th, 2013, 07:04 AM
  4. By using java how to listout sharing files in LAN...?
    By ram07 in forum Java Networking
    Replies: 4
    Last Post: March 26th, 2011, 10:18 PM
  5. Java LAN Chat Program
    By nevilltron in forum Java Theory & Questions
    Replies: 1
    Last Post: February 11th, 2010, 03:15 AM