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

Thread: Connecting programs with Java

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Connecting programs with Java

    Curious to know if anyone thinks this is possible or would know where to research the information needed to accomplish something like this,

    If I have three separate programs running on a computer. All three programs are meant for adding data too. Like Excel in fact Excel is one of them.

    If it possible to write a program in Java that would allow you to post all the data in it and then once submitted would automatically deliver the information to the sections of the other three programs running on the computer?


  2. #2
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Connecting programs with Java

    If i understand correctly you want to take user inputs and pass information to three programs?. If this is the case then its very much possible.

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Connecting programs with Java

    Yes that is what I want to do.
    can you send me in a direction so i can research how to do it?

  4. #4
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Connecting programs with Java

    You can get information from user in anyway through console, GUI (swings) and take store them and pass it on when user submits the data.

    1) Essentially you need to have a program to capture data from user.
    2) Once user submits you need to segregate data and create instances of three programs and set the information to the objects.

  5. #5
    Junior Member
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Connecting programs with Java

    Right, that sounds amazing. But how would you go about segregating the data and create instances of three programs and set the information to the objects?

    --- Update ---

    what im trying to wrap my head around is how could java open up a program that it has no affiliation with and then enter data in to its columns.

    I would assume i can make a j frame with places for the user to enter the data in to and then i could store it in a data base. but once thats done how could i import it in to the other three programs?

  6. #6
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Connecting programs with Java

    Does it mean that you want to persist data once user submits in these three programs?. If thats the case then you need to serialize the objects of these classes and de-serialize. Its like storing the state of the game and allowing user to restart it. Another way is to store this content in XML and read it once the app is started to pre-populate the data back into UI.

  7. #7
    Junior Member
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Connecting programs with Java

    Basically the three programs ask for the same data. so instead of opening each one and filling out the same thing over and over again I am trying to figure how to write something that will allow me to fill it out once and then it will transfer the data to the other three existing programs on its on.

  8. #8
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Connecting programs with Java

    If the same information is to be stored in three programs then what to need is three instances of a class to store the information. Create a class to store information and do with it.

  9. #9
    Junior Member
    Join Date
    Jun 2013
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Connecting programs with Java

    right i can manage storing the information. My question is how to get it in to the other three programs.

  10. #10
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Connecting programs with Java

    You need to pass that information to 3 instances of your classes either in constructor or through setter methods.

Similar Threads

  1. i want a solved java programs
    By guptaprachi in forum Java Theory & Questions
    Replies: 3
    Last Post: October 20th, 2013, 09:13 AM
  2. Connecting Java to SQL
    By moskiongo in forum JDBC & Databases
    Replies: 3
    Last Post: September 10th, 2012, 11:29 AM
  3. programs of java
    By chinu in forum Java Servlet
    Replies: 2
    Last Post: July 26th, 2011, 12:08 PM
  4. java application connecting to a server
    By wildheart25c in forum Java Networking
    Replies: 2
    Last Post: September 17th, 2009, 07:22 AM
  5. Help about connecting DB to java!
    By java_cs in forum JDBC & Databases
    Replies: 1
    Last Post: September 11th, 2009, 12:39 PM