The Sun 1.3.1 JDK has been updated, so the download filename has changed slightly, as well as the location of the install script in the downloaded file. The attached ebuild reflects these minor changes.
Created attachment 1869 [details] sun-jdk-1.3.1.04.ebuild
Created attachment 1870 [details] env file for sun-jdk-1.3.1.04 (to go in files dir)
Thanks for the bug report!