javawindowsproxyjava-service-wrapper

How to set up proxy for Java Application running as windows service


I am facing a weird issue. I have a java application which runs perfectly under proxy, but when the application is setup to run as a windows service it doesn't work. I have tried setting jvm with these parameter -Dhttp.proxyHost=10.0.0.100 -Dhttp.proxyPort=8800 but still it is not working. The issue seems to coming when running the Application as a windows service.


Solution

  • You can set _JAVA_OPTIONS system environment variable then restart the service.

    _JAVA_OPTIONS

    NOTE: This will affect all the java application running in the machine