-1

I want to develop a java application (run in windows) that can catch the url of the browser. what ever be the browser be, the url should be print in java. I tried it by listening to http socket, it doesnt work for me. Any one have any ideas?

I tried jpcap application, socket programing (java.net package)

But when i used jpcap. The following exception came.

The program run successfully in 2010 in xp. Now i am using windows 7

import jpcap.JpcapCaptor;

/**
 * 
 */

/**
 * @author james
 *
 */
public class NetworkInterface {

/**
 * @param args
 */
public static void main(String[] args) {
    jpcap.NetworkInterface[] devices = JpcapCaptor.getDeviceList();
    System.out.println(devices);

}

}

Exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: jpcap.JpcapCaptor.getDeviceList()[Ljpcap/NetworkInterface;
    at jpcap.JpcapCaptor.getDeviceList(Native Method)
    at NetworkInterface.main(NetworkInterface.java:17)

Can any one help me to solve this?

Ankur
  • 5,086
  • 19
  • 37
  • 62
Konzern
  • 110
  • 10
  • Welcome to StackOverflow. Please take a look here - http://stackoverflow.com/help/how-to-ask - and come back when you have a more specific programming-related question. – admdrew Dec 04 '13 at 19:02
  • I don't think is asking for code. He just want an idea of how to solve the problem. – Helio Santos Dec 05 '13 at 08:04

1 Answers1

0

You can use jpcap API on your java program to sniff packets. HTTP requests will have the URL on the first line.

Check here to solve the UnsatisfiedLinkError issue.

Community
  • 1
  • 1
Helio Santos
  • 6,606
  • 3
  • 25
  • 31