0

I have very simple batch script file with this line:

echo "Welcome to my script"
start "Title of my program" /wait /b "C:\Program Files (x86)\path_to_my_program\MyProgram.exe" %1 %2 %3 %4 %5

The script simply receives several arguments (up to five) and passes them to my application. Application does some actions on those params and stores them in some file.

Everything is working well, except any output in my application made with System.out.println() is not shown in windows command dock. The application is self-packaged JavaFx Bundle. Please any advice will be appreciated.

P.S. I can see output that is produced by script (echo). I can't see output from within the application neither form stdout neither from logback.

Evgeniy Mishustin
  • 3,343
  • 3
  • 42
  • 81
  • 1
    [Related](https://stackoverflow.com/q/31537869/6707985). I assume you cannot do very much... The exe will not produce any output whatsoever in the console. In the linked question it is noted that there is output in the file if redirected. If you have the exe, you might as well want to look into the app-folder you would have in there if it is bundled by javafx which should contain MyProgram.jar and start that with the arguments. – geisterfurz007 Jul 25 '17 at 13:14
  • 1
    You should use `%ProgramFiles(x86)%` instead of `C:\Program Files (x86)` and `%*` (all arguments) instead of `%1 %2 %3 %4 %5`. But even if your JavaFX bundled application prints something to __stdout__ or __stderr__, you would not see it with your command line using command `start` to execute the application as a separate process in __background__ because of using additionally `/b` option. Run in a command prompt window `start /?` for help on this command and `call /?` for help on `%*` and look on [Windows Environment Variables](https://en.wikipedia.org/wiki/Environment_variable#Windows). – Mofi Jul 25 '17 at 17:29

0 Answers0