Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

How to get Mac Id of my client machine

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
i want to write one servlet which will give me MacID of my client from whom request came

2] also the IP Address Of client although it came through proxy server

help me it is urgent
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Java has no native way to get a MAC address - you will have to write some native code for each platform. Then again it will probably be useless to you as a mac address changes as the packet moves through different network segments.

Proxy servers don't tell you the client IP.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Subject : How to get Mac Id of my client machine

Hi,

I want java code to get client MAC Address.
Right now i am able to get Client IP perfectly.But i want MAC address for that IP.

can any one help me?

Thanks in advance.

Regards,
Suresh.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
It's not possible in a servlet - the HTTP request simply doesn't contain that information.

For a desktop app, you'll need to find a native API that returns that information, and access it through JNI, just like Darren mentioned.
 
suresh senapathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Ulf Dittmer wrote:It's not possible in a servlet - the HTTP request simply doesn't contain that information.

For a desktop app, you'll need to find a native API that returns that information, and access it through JNI, just like Darren mentioned.



Hi ,

Thanks for your reply.
I am not seeing the solution in servlet.
what ever the tec in java no problem.
can you please tell me how we use JNI to implement this.

Thanks in advance.

Regrds,
suresh
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Repeat: not possible.
 
suresh senapathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Bear Bibeault wrote:Repeat: not possible.



Hi,

any one know how to get client machine information from my system(Client mac address(network address)).

Thanks in advance.

Regards,
Suresh
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Bear Bibeault wrote:Repeat: not possible.



So what part of it's not possible is confusing you?

The only way to do this is to run an agent program on the client that can use JNI to get the information and communicate it to the server. There is no way to do this with servlets or HTTP.
 
suresh senapathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Bear Bibeault wrote:

Bear Bibeault wrote:Repeat: not possible.



So what part of it's not possible is confusing you?

The only way to do this is to run an agent program on the client that can use JNI to get the information and communicate it to the server. There is no way to do this with servlets or HTTP.



Hi,
Thanks for the reply.
i have less knowledge about these type of things.

can any help me regarding jni.

i don't know who is the client ,who eve it may be ,i want to get network information.his information.
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Since this is a servlets forum, it is not the right place to post JNI questions.

But, if you don't know who the client is, how are you going to get him to install your program on his system?
 
suresh senapathi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Bear Bibeault wrote:Since this is a servlets forum, it is not the right place to post JNI questions.

But, if you don't know who the client is, how are you going to get him to install your program on his system?



Hi,

Thanks for your response.
My actual requirement is,get the system information(MAC address), the person who access my product site in the network.
This is to avoid fraud customers.

Can any help me?

Thanks in advance.

Regards,
Suresh
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I'm going to close this topic as this is not a Servlets issue.

I suggest you post a question in another forum. You will not be able to do this without being able to install a program on the client computer.
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic