Scan and connect to Wifi networks using Java

14,109

Solution 1

You'll have to rely on a JNI library since you can't access a wireless device directly in Java.

jWlanScan for Windows.

Solution 2

I suggest you to act upon your operating system. And for each of the supporting operating system try to analyse the results of the command lines needed to connect the wireless devices. It is quite straight forward and You will not have to work with JNI libraries.

For example for windows you can see the ones introduced here, here and here and for the linux it is still easier.

Share:
14,109
user1686758
Author by

user1686758

Updated on July 20, 2022

Comments

  • user1686758
    user1686758 almost 2 years

    Need to write a client, which can scan the available WIFI networks and connects to best known using Java. This might be desktop client which does this job. Any pointers would be helpful and appreciate your response.

  • user1686758
    user1686758 over 11 years
    Thank you for the response. Let me try that one and see. Appreciate your quick help.
  • user1686758
    user1686758 over 11 years
    Unfortunately its not working on my 64 bit machiene. Is there any other API?
  • Jon Lin
    Jon Lin over 11 years
    @user1686758 Sorry, I've got nothin. JNI components this specific are probably hard to come by, Java being OS/Hardware independent and all.