Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:43:05+00:00 2026-06-11T07:43:05+00:00

Sorry my bad English. I am trying to start Apache HTTPD server from Java

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:43:07+00:00Added an answer on June 11, 2026 at 7:43 am

    Did you try connect all 3 streams to console? I think the code looks quite good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, sorry for my bad English. I'm trying to get an IP from user.
first of all, sorry for my english (I'm from Spain) I'm trying to connect
sorry for my bad english, I'm french. I'm trying to make a newsletter solution
First of all, sorry for my bad English. I am trying to send POST
First of all sorry for my bad english! Anyway I'm trying to make a
Sorry for bad English :( Suppose i can preliminary organize recipes and ingredients data
Sorry for bad english and bad title! I have the table post id title
At first sorry my bad English. I want define routing for this url: For
at first sorry my bad English I want load model in my plugin controller
Sorry for my bad English. Just like what I asked. I have this class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.