Monday, September 12, 2016

New little visitor to my garden

S/He came to my garden on Saturday and hiding inside marigold plant.  She was scared little but very alert in things going on around her. I tried to move my hand around her, she kept keen focus. I moved my finger near her to step up, she was at once stood on my finger.

I tried to feed different bird food but she is not eating, later some time her parents flying around my home. I cant properly recognize same specie but i raised her to show them, her parents start coming near and i recognize it and left her on the wall she just flow to them and her mom start feeding her. Its a happy ending :)






Thursday, September 1, 2016

Proxy setting in Java to run in Terminal

Many time I use to forget how to work inside a firewall/proxy enabled environment, particularly when you using Terminal/Commandline. I use to run apps outside of the IDE some time run java class in command prompt. The app may try to connect internet or call some url etc. And you get exception of Connection timeout or socket error etc. All we need to do is make Java aware of Proxy IP and port!

When you work under a proxy and like to run your app in you have to setup the proxy setting for your Java app.

Java provides following way to work in a Proxy environment:

Proxy setup in Java provides both HTTP and HTTPs.
http.proxyHost – host name/ip of the proxy

http.proxyPort – port of the proxy

http.proxyPort – bypassing the direct accessport


For HTTPs: instead of http give https as prefix

System Property:
System class having property settings, through this you can enable proxy setting through programmatically

In your java code you may give inside a static block
System.setProperty("http.proxyHost", "<HOST>");
System.setProperty("http.proxyPort", "<PORT>");

To clear the setting use

System.clearProperty("http.proxyHost");

Command Line:
If you don’t like to hardcode in code you can use switch for your java command also as follows

$ java -Dhttp.proxyHost=<HOST> -Dhttp.proxyPort=<PORT> HelloWebWorld



Wednesday, August 17, 2016

Britta Riley: A garden in my apartment

My Dream house! This is called the form house :P  Use the maximum space of your apartment for "growing your own food"

New little visitor to my garden

S/He came to my garden on Saturday and hiding inside marigold plant.  She was scared little but very alert in things going on around her. I...