The first question is:
Why this code gives right output
Code: Select all
OpenConsole()
PrintN("Running Java")
JavaP = RunProgram("java", "-version", "",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read)
If IsProgram(JavaP)
While ProgramRunning(JavaP)
PrintN(ReadProgramString(JavaP))
Wend
PrintN("Exitcode: " + Str(ProgramExitCode(JavaP)))
Else
PrintN("not a program")
EndIf
Input()
CloseConsole()
Code: Select all
Debug "Running Java"
JavaP = RunProgram("java", "-version", "",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read)
If IsProgram(JavaP)
While ProgramRunning(JavaP)
Debug ReadProgramString(JavaP)
Wend
Debug "Exitcode: " + Str(ProgramExitCode(JavaP))
Else
Debug "not a program"
EndIf
How to not show java process or atleast, when myprocess is killed java is killed too?
As you may notice i am doing a small Java runner.
There's tones of them but i want to do one for my own use, with my own options and i want to be able to compile\run it on Linux\Mac\Windows
I want that if user is runing on windows ( alot noob's ), they can just kill the program in the TaskManager, so hiding the process is just need for windows, on mac\linux i will just run Java
If someone can help me i appreciate
