Java for OS X Lion installs Java SE 6 version 1.6.0_31 so that you can run Java based apps and programs in Lion. If you're looking for Java for Mac OS X 10.6 Snow Leopard, you can download it here.
Lion doesn't come with Java installed due to Apple's decision to drop it. Java for Lion is simple to install but you do need to close your browser before doing so. You can actually download Java for Lion via your Java preferences in your System Prefs folder. If you've had problems, this download should solve it. However, some users report problems running Java apps even after installing it so beware.
Note that this is the latest version of Java which has been updated to ensure your Mac is secure from the Flashback Trojan. It also configures the Java web plug-in to disable the automatic execution of Java applets. Users may re-enable automatic execution of Java applets using the Java Preferences application. If the Java web plug-in detects that no applets have been run for an extended period of time it will again disable Java applets.
Java for Lion allows you to run Java apps in Lion on your Mac.