一次提出两个问题!!~~~~~~~~~~~~ 1。如何在一个程序中调用运行一个有安装提示的exe的安装程序2。在程序中如何判断所用的系统是什么系统,比如windows、linux等。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 System.getProperty("os.name");操作系统名字 第一次问题不知道你什么意思。调用exe程序很简单,不知道你说的“有安装提示的exe的安装程序"有何特殊的意思。 1.Runtime.getRuntime().exec()2.System.getProperty("os.name");=================www.sunsides.com 1.String path = "C:/xxx.exe"; try { //相当于window的"开始"->"运行"的效果 Runtime.getRuntime().exec(path); } catch (IOException e) { e.printStackTrace(); }2.import java.util.Properties; public class getSystemProperties { public static void main(String args[]) { //通过获得系统属性构造属性类 prop Properties prop = new Properties(System.getProperties()); //在标准输出中输出系统属性的内容 prop.list(System.out); } } 1。如何在一个程序中调用运行一个有安装提示的exe的安装程序不管有没有安装提示,反正就是exe文件,楼上已经说了。 access中添加数据报错 java 读取文件 111 请教,OutOfMemory Error的解决办法。 try catch到底哪里影响效率了 难道LinkedList内不能放数组?高手求救啊! 找朋友:潍坊的JAVA朋友,请留言!!! 关于JB8的错误 谁知道那里有表达式计算的JAVA源程序????????????? 发布CMP的问题 请问一下WebLogic有中文版的吗? 有关画一条直线的问题
操作系统名字
2.System.getProperty("os.name");
=================
www.sunsides.com
String path = "C:/xxx.exe";
try {
//相当于window的"开始"->"运行"的效果
Runtime.getRuntime().exec(path);
} catch (IOException e) {
e.printStackTrace();
}2.
import java.util.Properties;
public class getSystemProperties
{
public static void main(String args[])
{
//通过获得系统属性构造属性类 prop
Properties prop = new Properties(System.getProperties());
//在标准输出中输出系统属性的内容
prop.list(System.out);
}
}
不管有没有安装提示,反正就是exe文件,楼上已经说了。