Java
How to set the proxy to be used by the JVM
0set VM arguments as
-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=9999
if exclusion is needed add
-Dhttp.nonProxyHosts=”localhost|127.0.0.1″
if authentication is needed
Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.-Dhttp.proxyUser=”username” -Dhttp.proxyPassword=”password”
Develop in JDK1.5, deploy on 1.4 :-)
0You must be wondering why the hell would I want to do that and why not just develop in 1.4? Well, for one, may be you want to use the new features of JDK1.5 but some of the customer for some reason still stuck with JDK1.4 or like in my case, due to some stupidity on our client's part that he bought license to an older version of the application server (yes, it was Websphere) which does not support 1.5 and rest of the stupidity on our part that we just assumed that the application server will be supporting 1.5.
We kept on developing the application and giving demos to the client on our server and when it came to deployment only then we realized that we are in one big soup. And as always Google to the rescue, which helped me find an open source solution Retroweaver which operates by transforming Java class files compiled by a 1.5 compiler into version 1.4 class files which can then be run on any 1.4 virtual machine.
For more details follow the link. Hope this helps ![]()
Tomcat does not start as service
0You have installed JDK latest version, and now you installed Tomcat, configfured to run as service but when you try and start it, it fails. Looking into the logs you see an error like his :
[2008-08-06 22:24:50] [info] Procrun (2.0.4.0) started
[2008-08-06 22:24:50] [info] Running Service…
[2008-08-06 22:24:50] [info] Starting service…
[2008-08-06 22:24:50] [174 javajni.c] [error] The specified module could not be found.
[2008-08-06 22:24:50] [994 prunsrv.c] [error] Failed creating java %JAVA_HOME%\jre1.6\bin\client\jvm.dll
[2008-08-06 22:24:50] [1269 prunsrv.c] [error] ServiceStart returned 1
[2008-08-06 22:24:50] [info] Run service finished.
[2008-08-06 22:24:50] [info] Procrun finished.
Tomcat startup eerrro as service
And that typo "eerrro" is not my doing
, it is tomcat only throwing this garbage into the log.
Most of the times, this is caused because of missing "msvcr71.dll". You can get it from http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71
Copy it into your system directory, usually C:\windows\system32 and ensure that file has execute permission set. Tomcat should be able to run as service now.
Do you enjoy this blog? Do you find the information helpful? Then go ahead and treat me to a coffee or send me a tip! I love Barista's Cappuccino Cookie n Cream . Choose any amount you wish, whatever you feel this blog is worth to you.