And getDocumentBase() returns null for local applets as of 7u40. Both are bugs on the part of Oracle, discussed in great detail here:

[Forum denied URL link. Instead Google java security...