As mentioned in the post above, Apple has decided to exclude Java in Lion. You have to download it manually, though it should prompt you in a popup and give you the option to get it - not tell you you have no internet connection.It always fails with "no internet connection" errors (of course Internet is on).
Any ideas?
Anyone got a download link without registration?
There is actually a really simple way to get Java, without any hassle at all, as long as you're familiar with Terminal.
All you have to do is go to LaunchPad > Utilities > Terminal
and from there simply type, sudo java followed by your user account password.