package com.lctvu;
/**
* 使用java访问服务器端地址
* @author Administrator
*
*/
public class Login {
public static void main(String[] args) {
try {
//定义服务器IP
String ip="172.168.165.55";
//服务器访问地址
String path = "http://"+ip+":8080/";
//循环访问16个文件
for (int i = 1; i <= 16; i++) {
//访问一个网页地址
Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE " + path + i + ".html");
//暂停8秒
Thread.sleep(8000);
//关闭所有IE窗口
Runtime.getRuntime().exec("taskkill /im iexplore.exe /f");
//暂停3秒
Thread.sleep(3000);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
简单的批量登陆(非HttpURLConnection
最新推荐文章于 2023-11-12 13:59:42 发布