Find Public IP Address in Java

Find Public IP Address in Java Programming

Here, we have posted a Simple Program that describes How To Find Public IP Address in Java Programming that you’re currently logged in. This Java Program is an IP Address Tracker Program wherein you can get the Public IP Address of your Machine only when you connect your System to the Internet.


What is an IP Address?

IP  stands for Internet Protocol Address. It is a 32-Bit Address String. It is a Numerical Tag associated with every Electronic Device such as Mobile Phone, Laptop, Desktop, Printer, Router, etc that helps to identify every single device connected to a Network. It is primarily used for Communication with different devices connected on the same Network.

How Does This Program Works?

This Program makes use of InetAddress Class to get the Public IP Address of your machine via WhatIsMyAdddress.com. However, this Program works only when your System is connected to the Internet. It gives an Error when Internet is not connected which we have handled through Exception.

Find Public IP Address in Java Programming Language


Output

Find Public IP Address in Java Programming Language

We hope that you got a basic information about How To Find Public IP Address in Java Programming Language. In case you get any Compilation Errors with this Java Program To Check Public IP Address or you have any doubt about it, let us know about it in the Comment Section below.

Recommended Programs
1Find Local Host IP Address in Java Programming Language
2Execute Linux gEdit Text Editor with Java Program
3Java Program To Convert Numbers into Words
4Print Map of India in Java Programming
5100+ Java Programs

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

4 thoughts on “Find Public IP Address in Java

    • July 31, 2016 at 9:43 pm
      Permalink

      Thank you Shanmukha! We hope you stay connected with us and find some excellent C Programs on our website!

      Reply
  • August 17, 2016 at 5:50 pm
    Permalink

    thank very hopefully this program bro.. but i want to automatically alert ip address .how to find that profram ..please tell that progrma

    Reply

Join The Discussion