• Post Reply Bookmark Topic Watch Topic
  • New Topic

IP's

 
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: 9372
11
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!