Update 2: There’s now a script that can repackage Oracle’s JRE or JDK into a Slackware package here (64-bit here). Just follow the instructions in the README file. Again, here is some information about installing OpenJDK.
Update: The following information should still work, but it is somewhat obsolete now that Oracle Java has gone away from Slackware due to licensing restrictions. Slackware 13.37 is the last version of Slackware that has a SlackBuild script for Oracle Java. Consider taking a look at OpenJDK.
There is no official SlackBuild script for Java 7 yet, but I believe the following works.
1. Download the JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Download jdk.SlackBuild, slack-desc, and profile.d (use slackware64-13.37 if using 64-bit)
DVER in the SlackBuild script to match the version of the downloaded JDK and change the
tar xf and change the
installpkg /tmp/jdk-7uxx-i586-1.txz where
xx is the update number
If installing the JRE, use the files here.