使用 Java 扫描并连接到 Wifi 网络
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12517765/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Scan and connect to Wifi networks using Java
提问by user1686758
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.
需要编写一个客户端,它可以扫描可用的WIFI网络并使用Java连接到最著名的。这可能是完成这项工作的桌面客户端。任何指示都会有所帮助,并感谢您的回应。
回答by Jon Lin
回答by Johnny
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.
我建议您根据您的操作系统采取行动。并针对每个支持的操作系统尝试分析连接无线设备所需的命令行的结果。它非常简单,您不必使用 JNI 库。
For example for windows you can see the ones introduced here, hereand hereand for the linux it is still easier.