Sorry my bad English.
I am trying to start Apache HTTPD server from Java on Windows
public static Process pp;
@Override
public void run() {
try {
Runtime run = Runtime.getRuntime();
try {
MyThread.pp = run.exec("usr/local/apache24/bin/httpd.exe");
BufferedReader in = new BufferedReader(new InputStreamReader(MyThread.pp.getErrorStream()));
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
If Apache HTTPD will started without output to the console (without errors and warnings) then this code started Apache HTTPD server correctly (with two processes in RAM) and all work fine .
But if Apache HTTPD server has any output to the console, then this Java code can't start Apache HTTPD Server correctly. For example, if Apache HTTPD server will has output to the console
AH00112: Warning: DocumentRoot [C:/Art/Dropbox/OpenSource/MyGIT/myprivatesite/]
does not exist
AH00548: NameVirtualHost has no effect and will be removed in the next release C
:/Art/MyServer/usr/local/apache24/conf/httpd.conf:535
than Java starts only one process of the Apache HTTPD server and he is can't work.
How I can start Apache HTTPD server if he has any console output?