• Post Reply Bookmark Topic Watch Topic
  • New Topic

IP's  RSS feed

 
Robbie Harjes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Is there any command that will return the current IP of a given user? For instance, an applet that calls a function to return the IP of the user who loaded the applet? Thanks
 
Joe Ess
Bartender
Posts: 9436
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The static method java.net.InetAddress.getLocalHost() returns an InetAddress instance and you can get the IP from that. I'd be surprized if it would work since the applet, unless it is a signed applet, can't connect a socket to the host it is running on.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!