Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:44:09+00:00 2026-05-26T15:44:09+00:00

Having 2 bare console Java applications running on the same machine at the same

  • 0

Having 2 bare console Java applications running on the same machine at the same time I want to have, for example, something like a friend.println(String s) im my first app causing the second app to output s to its stdout (while there is to be silence in the first app stdout).

How to implement this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:44:10+00:00Added an answer on May 26, 2026 at 3:44 pm

    You have to pass a message between the two somehow. Since they won’t both be running inside the same JVM, you have to use a communication medium that can talk between separate processes on a machine.

    You could:

    • Use RabbitMQ (tutorials can be found here)
    • Use RMI
    • Pipe the output from one to the other
    • Shared file access: have app2 monitor a file that app1 writes to, and react to any new entries in that file
    • Use network sockets: Have app2 make a network socket available to receive communication from app1 (via connecting to localhost)

    Which one you choose really depends on what you want to accomplish, and how complex you need it to be. There are pros/cons to each approach. Some of the concurrent/file-based options might produce deadlocks, for example, but any one of those choices should provide a viable method for accomplishing what you describe. The learning curves on these technologies aren’t too difficult if there are some you’re not familiar with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with running a bare example. I'm using this to declare a
Having a heckuva time with this one, though I feel I'm missing something obvious.
I have a DEV server running our CMS and I would like to pull
Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
Having difficulty articulating this correlated subquery. I have two tables fictitious tables, foo and
I have been having problems with the 400 Bad Response, and have got it
I have been trying to figure this one out but I am having a
I'm creating a bare bones backbone example to try to learn it and am
I'm having a strange time dealing with selecting from a table with about 30,000
I'm attempting to put a bare git repository on a ubuntu server running on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.