Please tell me the library, or any class that works with the terminal. There is a folder with an executable Python script, there will also be a java file. The script is called in the terminal, it processes, transmits certain data (for example, the host) calls this java file, which, when opened, pulls out the transferred host and uses it in its code

  • I understand correctly that you want to be able to run some script that will compile the java file and run it? - KoVadim
  • the script writes data to the console (terminal) during execution, at the end java-file is pulled, which after launching works with the data that the script wrote to the console - Iga
  • The file cannot work with the data. It needs to be combined in advance. But no one bothers you to redirect the data that is output to the console to a file (unless there is some kind of ncurse) and then either use this file in java code, or use handles to parse the file and extract the necessary data. - KoVadim
  • one
    Run the script (as you call it). Connect to its standard input (see the PIPE topic). Output subprocess to this standard input and duplicate to the terminal if necessary. When all output is finished waiting for the completion of the subprocess. If you need to pass some parameters, it is easier to do it through command line parameters. - Sergey
  • one
    Your question is not really clear. If you need to transfer a couple of (yes even 100,500) parameters of the host type, then it is more logical and easier to pass through the command line. When you run the program, you can specify any parameters. The arguments of the function main (arg []) are intended for obtaining these parameters. And if someone else has developed the java file so that it accepts commands from standard input, then of course it’s wiser to use a pipeline. - Sergey

0