Jon Skeet is right!
For me in case of java.net.URL JVM pass next headers:
User-Agent: Java/1.7.0_10
Host: translate.google.cn
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
In case of Apache HttpClient:
User-Agent: Jakarta Commons-HttpClient/3.1
Host: translate.google.cn
And if you change, the user agent for java.net.URL:
System.setProperty("http.agent", "Jakarta Commons-HttpClient/3.1");
request is successful, without HTTP 403.
Looks like you get 403 error if your user-agent start with: Java
. Any user agent with pattern Java.*
throws 403 error. But if you use this pattern .+Java.*
all is ok.