Windows 7 - JAVA - starting or stopping apache 2 (httpd) service
I would like to know how to stop, start, and restarting the Apache (2.0.64) service installed under Windows 7 in my program JAVA (executed in the same machine).
Initially, I developed my 开发者_JAVA技巧apps in Linux environment and I had no problem to do that. Now, I'm migrating in Windows 7, and I can't do it. I have an error message like : "(OS 5)Access denied. : failed to open Apache2 service".
At the beginning, I thought that error is due to the fact that my account system doesn't have enough rights to do so. I tried to change proprietary of folder c:\Program Files(x86)\Apache2, and in Services (open session as my account). It still no working and I get the same message every time.
I need absolutely to control Apache2 process.
If anyone have any ideas that could help me?
Thank you.
One more strange stuff of Windows ....
I figured out why my apps in JAVA didn't work in Windows 7 environment. It juste because since Windows Vista, MS tries to hide the "popup flooding" stuff with something called "UAC - User Account Control".
And in the default configuration, whatever you do; change proprietary of files or services, you still execute them in "limited user" so you don't have trace, you don't know why your programs don't work properly, and you can't even debug it ...
So, if you want to execute an exec stuff in Windows that was installed as "Administrator" role from you apps (Java in my case) , you must play with levels that provide UAC and restart your computer to take effect of that modification.
For me, i set i to the lowess level and it work. I remarked that when i do "Windows"+R, i have a message like "This task's going to be executed as admnistrator privileges"... OK
In short, when you develop with Windows you must debug Windows first, then your apps
....
Welcome to Windows and long life Linux !
精彩评论