发布网友 发布时间:2022-04-21 17:37
共2个回答
热心网友 时间:2023-07-06 20:05
用Eclipse可以将java文件打成.jar包,再用exe4打成exe文件,不过exe4貌似不是免费的,打成jar包的具体过程是File->Export->java->jar file->next->选择工程中的java文件->下面选择jar包的路径->next->main class礼选择主类->finish,就ok 了,注意,只有你的机子上安装了jre/jdk之后打出来的才是jar包,直接点击才能运行,不然打出来的是压缩包,也就是说jar包只有在装了java运行环境的机子上才可以运行
热心网友 时间:2023-07-06 20:05
zcat命令
compress [-fv] [-b bits] [file...]
compress [-cfv] [-b bits] [file]
uncompress [-cfv] [file...]
zcat [file...]
Process p = Runtime.getRuntime().exec("ps -ef");
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p.getInputStream()));
BufferedReader stdError = new BufferedReader(new
InputStreamReader(p.getErrorStream()));
// read the output from the command
System.out.println("Here is the standard output of the command:\n");
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}
// read any errors from the attempted command
System.out.println("Here is the standard error of the command (if any):\n");
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}
System.exit(0);