菜鸟!求解!
这是在论坛里看到大虾写的代码 特感兴趣的 可是我怎么运行不了 会出错!是代码问题 还是我运行的问题!!求大家帮帮忙!!
package net.iegames;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
public class BanSupport extends JFrame {
private String keyWord;
private JLabel msg;
public BanSupport(String keyWord) {
super("想禁谁,就可以禁谁");
this.setBounds(200, 200, 500, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
msg=new JLabel("所谓监控用户硬盘,只是个笑话.根本就是公开的API。360是SB ");
this.getContentPane().add(msg);
this.keyWord = keyWord.toLowerCase();
this.check();
}
public void check() {
Runtime runtime = Runtime.getRuntime();
Process process = null;
try {
process = runtime.exec("cmd /c Tasklist");
BufferedReader in = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String s = "";
while ((s = in.readLine()) != null) {
s = s.toLowerCase();
if (s.startsWith(keyWord)) {
s = s.substring(0, s.indexOf(".exe") + 4);
JOptionPane.showMessageDialog(this, "您的系统中检测到"+s+",为了保障您的安全,本软件即将退出。请卸载后再使用本检测软件。");
System.exit(-1);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
package net.iegames;
public class Ban360 extends BanSupport {
public Ban360() {
super("360");//这里可以换成QQ
}
public static void main(String[] args) {
Ban360 demo = new Ban360();
demo.setVisible(true);
}
}
package net.iegames;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
public class BanSupport extends JFrame {
private String keyWord;
private JLabel msg;
public BanSupport(String keyWord) {
super("想禁谁,就可以禁谁");
this.setBounds(200, 200, 500, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
msg=new JLabel("所谓监控用户硬盘,只是个笑话.根本就是公开的API。360是SB ");
this.getContentPane().add(msg);
this.keyWord = keyWord.toLowerCase();
this.check();
}
public void check() {
Runtime runtime = Runtime.getRuntime();
Process process = null;
try {
process = runtime.exec("cmd /c Tasklist");
BufferedReader in = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String s = "";
while ((s = in.readLine()) != null) {
s = s.toLowerCase();
if (s.startsWith(keyWord)) {
s = s.substring(0, s.indexOf(".exe") + 4);
JOptionPane.showMessageDialog(this, "您的系统中检测到"+s+",为了保障您的安全,本软件即将退出。请卸载后再使用本检测软件。");
System.exit(-1);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
package net.iegames;
public class Ban360 extends BanSupport {
public Ban360() {
super("360");//这里可以换成QQ
}
public static void main(String[] args) {
Ban360 demo = new Ban360();
demo.setVisible(true);
}
}
...全文
相关推荐
TrintyCore菜鸟工具
用于T端简单修改配置文件使用。
java菜鸟教程_JAVA菜鸟教程_
java教程书籍
阿里云ECS建网站(建站)超详细全套完整图文教程!菜鸟必看!-附件资源
阿里云ECS建网站(建站)超详细全套完整图文教程!菜鸟必看!-附件资源
C语言菜鸟基础教程之求1到100的和
题目:求1+2+3+……+98+99+100 (1)用数学方法求解 (2)编写C语言程序求解 解: (1)数学方法 S = 1+2+3+……+98+99+100 = (1+100) + (2+99) + (3+98) + …… + (49+52) + (50+51) = 101 * 50 = 5050 (2)C语言编程 #include <stdio> int main() { int sum = 0; // 赋初值 for(int i = 1; i <= 100; i++) { sum = sum + i; } printf(total is %
我的小作品无脚本flash动画小浣熊超级简单易学,专对菜鸟级别!
无脚本flash动画我的小作品无脚本flash动画小浣熊超级简单易学,专对菜鸟级别!


Java SE

