answersLogoWhite

0

The InetAddress.getLocalHost() method will return an InetAddress object with your local address. You can get the data with a call to InetAddress.getLocalHost().getAddress() to return a byte array in which each byte refers to an octet of your IP address.

Note that this will often not be useful to people connecting to the internet through a router. This will get your local network IP address and not the address that the rest of the world would see. For that you should look towards using platform-specific workarounds (ex: calling and parsing the ipconfig command in Windows).

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How does one use a Java code to ping an IP address?

In order to ping an IP address using a Java code, one would require to have a higher than rudimentary understanding of computer processes. This can be done by finding the Java code you wish to use and then running it back to trace the source of the IP.


How do you control a system using ip address?

you can not just control a system using ip address.(thats hacking) you would to use progames like network admin tool


What do you mean by ip?

Ip means internet protocol.If we want to connect internet or communicate two or more system we need a ip address. ip address provided by internet service provider. Each system has unique ip address. ip address consists of 4 bytes seperated by dots. There are two types of ip address available: 1)Internal ip address 2) External ip address 1) Internal address means our system ip address.i check my internal ip address in my windows xp using Dos command. you can also find internet ip address this method. 2)External ip address means internet ip address. It is provided by internetsevice provider I check my external ip address using this site ip-details.com . Here you can also search ip,domain host iplocation,Country,Latitude and Longitude details and etc.


How do you find the IP address of system?

We are using two types of ip address: 1) Internal ip address 2) External ip address If you want to check your internal ip address on Windows use the following methods: 1)start->Run->cmd->type ipconfig


What is cnfigured in mainframes that can be apart of network?

If a mainframe is using TCP/IP as its protocol it is configured the same way any other system using TCP/IP would be configured: an IP address, subnet mask, and default gateway address.


What is the dns ip address for Gmail?

DNS is the domain name system for short .DNS is a system that maps a name to an address . Ip address for Gmail.com is 173.194.36.86 .


Does an iphone have an IP address?

Yes, if you are using the internet you'll have an IP address.


What is the IP address of smart?

IP address is a logical address of a system which could be used to identify it. There are 2 types of IP address, IPV6 and IPV4.


Using command prompt how do you find your ip address?

Answer In the Windows command prompt, type "ipconfig". That will list basic information, including your IP address, of all your network interfaces. Be warned this will only return you your local IP address. That means if you're on a LAN, then you'll get the IP address of that network and not your WAN IP address. *************************** Note: It is "ifconfig" on a Linux operating system.


Ip address for cisco?

Using comminicution and identfaction purpose ip address cisco


How deciphers IP?

Decipher the IP address means, obtain IP address using Hardware address, and basically we use RARP(Reverse address resolution protocol) to find out the IP address from hardware address.


What is the ip address and if your computer does not connected to internet then your computer have an ip address?

IP address is the internet protocol address which is unique for each system in the given network. IP address is like an unique id that uniquely identifies a system on a network. Yes even if you are not connected to internet, computer would still have an IP address.