Have a look at the actual error message:
Certificate is only valid for www.java.com.
It is a server misconfiguration. But in this case this is not a direct security issue because both domains belong to the same company. (It is an indirect one because it teaches people to ignore this kind of error message).
Background
What happens here is this:
- You told your browser to visit java.com
- But the server answered: I am www.java.com (without aliases) and here is my certificate to prove that.
But your browser does not want to talk to www.java.com, it was told to connect to java.com.
If both domains are not under the control of the same people, this is an issue (think of <something>.dyndns.org):
The connection is encrypted just fine, but you had a secured connection to the attacker. The attacker would then read and possible modify it before passing it on to the real server. When the attacker gets the answer, he can again read and modify it, before he sends it to you. This is called a Man in the middle attack.
Therefore this warning is important in the general case.
What to do?
To be on the safe side you should do this: Look at the domain in the error message. If it is likly that the domain is a valid destination for where you wanted to go (e. g. added or missing "www"), type that domain into the address bar. Do not copy it because some special character may look like valid characters, so you could end up elsewhere on a phishing side.