How to open another java program in java and get all the information it sends on the console

Asked

Viewed 270 times

2

Well I was researching but I was not very successful, I wanted to open a java program, a jar, she does not have Jframe, she only sends information on the Console, I wanted to run her and take this information and send her this information too, Someone could help me ?

  • Welcome to the Sopt. Reading your question I think it would be nice to edit and reformulate the ending and if possible the title, because it was a little confused :D

  • Got very confused!

  • What you want to do is reverse engineer.

  • 1

    If you have researched, keep in mind that English research is usually more efficient. Look at this question in Stackoverflow, http://stackoverflow.com/questions/1320476/execute-ther-jar-in-a-java-program, particularly this answer, http://stackoverflow.com/a/1320609/1997073, should solve your problem.

  • Thanks, I don’t know much English, I’ve been doing some research, but I didn’t succeed.

  • I will try to explain better, I want to open a java program, as we open it in cmd, using scanner, without being Jframe(Graphical Interface), this "program" when executed returns me some messages I need to pick them up and send msg to him too. http://prntscr.com/8fx546

Show 1 more comment

1 answer

0

The question is a little confusing, but if you want to take the data of this program you can try to run it by terminal (console) and assign to a text file.

Example:

java -jar Programa.jar > saida.txt

Thus, you can make your code read this text file to take advantage of the data that the jar program generated.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.