[go: up one dir, main page]

0% found this document useful (0 votes)
15 views15 pages

Ajp 2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 15

A

Micro Project Report


On
Ip Java Code for Finding a Ip address using swing f
Under Course :-Advance Java Programming (22517)
Semester :- V

Maharashtra State Board of Technical Education,Mumbai

Department of Computer Engineering

Sir Dr.M.S.Gosavi polytechnic Institute Nashik.


Academic Year : 2024-25
Program name : Computer Engineering Academic Year : 2024 – 2025
Course Name and Code : Advance Java programming Semester : Fifth Semester
(22517)

A Study on
Java Code for Finding a Ip address using swing
Micro Project Report
Submitted in November 2024 by the group of CO Students

Sr. Roll No. Full name of Student Enrollment Seat No.


No (Sem – V) No. (Sem – V)
1 25 Govardhane Krushna Rajesh 2218000051 515115
2 40 Karanjkar Roshan Ravindra 2218000073 515130
3 26 Patil Neha Mahendra 2218000053 515116
4 63 Chavan Prasanna Sanjay 2218000064

Under the Guidance of


Prof. T. R. Kawad
In
Three Years Diploma Program in Engineering & Technology of Maharashtra State Board of
Technical Education, Mumbai (Autonomous)
ISO 9001:2008 (ISO/IEC-27001:2013)
at
1800- Sir Dr. M.S. Gosavi Polytechnic Institute, Nashik Road, Nasik - 422101
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI

Certificate

This is to certify that Mr. Karanjkar Roshan Ravindra Roll:40 of Computer


Engineering Diploma Programme Engineering & Technology at (1800) Sir
Dr. M. S .Gosavi Sir Dr. M. S .Gosavi Polytechnic Institute, Nashik road
Nashik-422101 has completed the micro-project satisfactory in

Subject : (Advance Java programming (22517)) in the academic year 2024-


2025 as prescribed in the MSBTE curriculum of I Scheme.

Place: Nashik Enrollment no: 2218000073

Date: Exam seat no : 515130

Prof. T.R.Kawade Prof. T.R.Kawade DR.Mrs.S.P.Deshpande

Subject Teacher Head Of Department Principal


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI

Certificate

This is to certify that Mr. Govardhane Krushna Rajesh Roll:25 of


Computer Engineering Diploma Programme Engineering & Technology at
(1800) Sir Dr. M. S .Gosavi Sir Dr. M. S .Gosavi Polytechnic Institute,
Nashik road Nashik-422101 has completed the micro-project satisfactory in

Subject : (Advance Java programming (22517)) in the academic year 2024-


2025 as prescribed in the MSBTE curriculum of I Scheme.

Place: Nashik Enrollment no: 2218000052

Date: Exam seat no: 515115

Prof. T.R.Kawade Prof. T.R.Kawade DR.Mrs.S.P.Deshpande

Subject Teacher Head Of Department Principal


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI

Certificate

This is to certify that Miss. Patil Neha Mahendra Roll:26 of Computer


Engineering Diploma Programme Engineering & Technology at (1800) Sir
Dr. M. S .Gosavi Sir Dr. M. S .Gosavi Polytechnic Institute, Nashik road
Nashik-422101 has completed the micro-project satisfactory in

Subject : (Advance Java programming (22517)) in the academic year 2024-


2025 as prescribed in the MSBTE curriculum of I Scheme.

Place: Nashik Enrollment no: 2218000053

Date: Exam seat no: 515116

Prof. T.R.Kawade Prof. T.R.Kawade DR.Mrs.S.P.Deshpande

Subject Teacher Head Of Department Principal


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI

Certificate

This is to certify that Miss. Chavan Prasanna Sanjay Roll:63 of Computer


Engineering Diploma Programme Engineering & Technology at (1800) Sir
Dr. M. S .Gosavi Sir Dr. M. S .Gosavi Polytechnic Institute, Nashik road
Nashik-422101 has completed the micro-project satisfactory in

Subject : (Advance Java programming (22517)) in the academic year 2024-


2025 as prescribed in the MSBTE curriculum of I Scheme.

Place: Nashik Enrollment no: 2218000064

Date: Exam seat no:

Prof. T.R.Kawade Prof. T.R.Kawade DR.Mrs.S.P.Deshpande

Subject Teacher Head Of Department Principal


Index

Sr. No Title Page No

1 Abstract and Introduction 1

2 Main Body / Content 2

3 Flow chart 3

4 Conclusion / Learning Outcomes 4

5 Literature Review and References 5

6 Evaluation Sheet 6
• Abstract:
The IP Finder Tool is a simple Java application designed to allow users to convert a given domain name
(URL) into its corresponding IP address. The tool uses the Java Swing framework for the graphical user
interface (GUI) and the InetAddress class for DNS (Domain Name System) resolution. Users can enter a
URL (e.g., www.example.com) in a text field and, upon clicking the "Find IP" button, the application
performs a lookup and displays the IP address associated with the domain.

This project showcases the basic principles of networking in Java, focusing on DNS resolution through
the InetAddress API, and it provides a straightforward interface for resolving domain names to their
respective IP addresses. In cases where the URL is invalid or cannot be resolved, the tool handles the
error gracefully by showing an error message to the user.

The IP Finder Tool serves as a valuable utility for network troubleshooting, web development, and
general educational purposes, as it helps users better understand how domain names are mapped to IP
addresses. Additionally, it demonstrates the use of Java for creating cross-platform desktop applications
with network functionality.

Key Features:
• User-friendly GUI: A simple interface with a text field for entering URLs and a button to initiate
the IP resolution.

• IP Resolution: Uses Java's InetAddress.getByName() method to resolve domain names to IP


addresses.

• Error Handling: Provides user-friendly error messages in case of invalid URLs or resolution
failures.

• Cross-Platform: Built using Java, ensuring compatibility across multiple platforms (Windows,
macOS, Linux).

Applications:
• Useful for developers and network administrators who need to quickly find the IP address of a
website.

• Helps users troubleshoot network-related issues by identifying the IP address of a domain.

• Educational tool for understanding DNS resolution and Java network programming concepts.

• Aim:
The primary aim of the IP Finder Tool project is to provide a simple and intuitive application that allows
users to resolve domain names (URLs) to their corresponding IP addresses. By leveraging Java's
networking libraries, particularly the InetAddress class, the tool enables users to enter a URL and retrieve
the associated IP address with a simple click of a button.
Specifically, the project aims to:

1. Simplify Domain Name Resolution: The tool provides an easy-to-use interface for resolving
domain names (e.g., www.google.com) to their IP addresses (e.g., 142.250.185.206), making it
accessible to users without requiring technical knowledge of networking.

2. Demonstrate Networking Concepts: The project serves as a practical demonstration of how


DNS (Domain Name System) resolution works, and how Java can be used to programmatically
retrieve an IP address using the InetAddress class.

3. Create a User-friendly GUI: By implementing a graphical user interface (GUI) with Java Swing,
the project ensures that the tool is easy to interact with, even for users who are not familiar with
command-line tools.

4. Serve as a Practical Utility: The tool is intended to be a useful utility for network administrators,
web developers, and general users who need to quickly find the IP address associated with a given
URL for troubleshooting, testing, or educational purposes.

• Main Content:
The IP Finder Project is a Java application that allows users to resolve a given domain name (URL) into its
corresponding IP address. It uses Java Swing to create a simple graphical user interface (GUI) with a
JTextField for URL input, a JButton to trigger the action, and JOptionPane to display the result. The
program utilizes InetAddress.getByName() to perform domain name resolution. If the URL is valid, it
shows the IP address; if not, it handles errors using UnknownHostException and displays an error message.
This project demonstrates basic networking, GUI development, and exception handling in Java
• Flow chart:

Start

Display "Enter URL" message and


input field

User enters URL and clicks "Find IP"


button

Retrieve the URL from input

Attempt to resolve URL to IP address using


InetAddress.getByName()

Is URL valid?

yes No

Display IP address using Display error message


JOptionPane "UnknownHostException" error

End
• Program:-

import javax.swing.*;

import java.awt.event.*;

import java.net.*;

public class IPFinder extends JFrame implements ActionListener{

JLabel l;

JTextField tf;

JButton b;

IPFinder(){

super("IP Finder Tool - Javatpoint");

l=new JLabel("Enter URL:");

l.setBounds(50,70,150,20);;

tf=new JTextField();

tf.setBounds(50,100,200,20);

b=new JButton("Find IP");

b.setBounds(50,150,80,30);

b.addActionListener(this);

add(l);

add(tf);

add(b);

setSize(300,300);

setLayout(null);

setVisible(true);

public void actionPerformed(ActionEvent e){


String url=tf.getText();

try {

InetAddress ia=InetAddress.getByName(url);

String ip=ia.getHostAddress();

JOptionPane.showMessageDialog(this,ip);

} catch (UnknownHostException e1) {

JOptionPane.showMessageDialog(this,e1.toString());

public static void main(String[] args) {

new IPFinder();

• Output:
• Conclusion:

The IP Finder Project is a simple yet effective Java application that demonstrates the resolution of
domain names (URLs) to their corresponding IP addresses. By leveraging Java Swing for the graphical
user interface (GUI) and Java Networking features (specifically the InetAddress class), the program
provides an easy-to-use tool for users to quickly find the IP address of any valid website or server.
References:

➢ https://www.javatpoint.com/ip-finder-in-java

➢ https://www.javatpoint.com/java-swing
• Evaluation Sheet for the micro project:

Roll Name of student Enrollment Seat no Marks Marks out of Total


no out of (4) oral
No. (6) presentation
group
activity

25 Govardhane Krushna Rajesh 2218000052 515115

40 Karanjkar Roshan Ravindra 2218000073 515130

26 Patil Neha Mahendra 2218000053 515116

63 Chavan Prasanna Sanjay 2218000064

Prof.T. R. Kawade.
Department of Computer Engineering,
Sir Dr. M.S.Gosavi Polytechnic Institute,
Nashik Road Nashik

You might also like