Try the following:
Go to Applications » Utilities and open the Java Preferences.app.
Make sure the checkbox at the top is 'checked' in order to enable Java in Lion. If Java is not already installed, you may be asked to do so first.
[crarko adds: When I did this I was asked to download the Java VM using Software Update. It appears to have become an optional install, like Rosetta was with Snow Leopard. It also looked like this was still the Apple Java VM, and not an Oracle-produced version, although I can't say so for certain.]