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: java application connecting to a server

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java application connecting to a server

    I don't know how or where to start so ill present you with a scenario and hopefully youll tell me how i can do this using java.
    i start my java application. the application manages pictures. lets say i change the name of hte picture or even edit the pic itself. then i press upload. a small pop up window appears asking me to enter my login info. i do so and press CONNECT. the application connects me to a server and uploads the picture to it.
    thts it.
    how do i do this? i already wrote the code that handles the pictures. searching sorting etc. but how do i do the connection part. the server is a new pc that ill b buying next week. ill read on how to turn a pc to a server. but after that im totally clueless.
    Help?

    i saw some sections that i could post this in but i realy am new to this. i wouldnt even no where to post it really.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: java application connecting to a server

    You'll want to look at the Socket Class. It tells you how to set up a Java socket to a server. I'm not positive, but I think JavaEE is designed to allow for easy development of server and client software. If you want to quickly develop something, it may be worth it to look into JavaEE.

  3. #3
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: java application connecting to a server

    There are some semi-good tutorials on networking out there.

    Writing the Server Side of a Socket (The Java™ Tutorials > Custom Networking > All About Sockets)

    You could of course use some JavaEE if you wish and just have your client connect using RMI etc. However if you are passing this data straight over the internet you might want to have a look at sockets and I guess that would be the best newbie way to go as well.

    You can also have a look at Apache MINA - Index

    // Json

Similar Threads

  1. Java program to Add a JMenu toolbar to a Java Swing application
    By JavaPF in forum Java Swing Tutorials
    Replies: 6
    Last Post: March 6th, 2012, 12:25 PM
  2. How to Sendkeys to an application in Java using the Robot Class
    By JavaPF in forum Java SE API Tutorials
    Replies: 6
    Last Post: August 4th, 2011, 12:13 AM
  3. Help about connecting DB to java!
    By java_cs in forum JDBC & Databases
    Replies: 1
    Last Post: September 11th, 2009, 12:39 PM
  4. Replies: 2
    Last Post: July 7th, 2009, 02:34 PM
  5. Replies: 0
    Last Post: May 21st, 2009, 11:17 AM