When compiling php 4.1.2 with java support it fails saying that javac cannot be found. Attached is a patch that resolves the problem.
Created attachment 468 [details, diff] diff against php-4.1.2-r3.ebuild
Using 4.1.2-r6, with sun-java-jdk-1.4 works.
Fixed in php-4.1.2-r7