Jump to content

Run bat and get output


Worqy

Recommended Posts

I now wan't to get the output out of a jar file insted of a batch file.

 

I use the code:

<?php
exec('java -jar D:\test\server.jar', $result);
print $result;
?>

 

When i load the script, it opens the jar file, but the page keeps loading.

Then when I close the jar file, the script stop loading and displays "Array".

 

I would want to get the output of the jar as long as its open.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.