Yo lo hacia as, a ver si te vale:
Código:
public String clientIP()
{
String s1 = "unknown";
String s2 = getDocumentBase().getHost();
int i = 80;
if(getDocumentBase().getPort() != -1)
i = getDocumentBase().getPort();
try
{
String s = (new Socket(s2, i)).getLocalAddress().getHostAddress();
if(!s.equals("255.255.255.255"))
s1 = s;
}
catch(SecurityException _ex)
{
s1 = "ERROR";
}
catch(Exception _ex)
{
s1 = "ERROR";
}
return s1;
}
Como ves no es tan trivial como pillar la IP a través del applet ya que está te devolverá normalmente Localhost. Por eso abro un socket.
Saludos