import java.awt.*;
import java.awt.event.*;
public class test extends Frame
{
Button t =new Button("run program");
public test()
{
add(t);
t.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try{
Runtime.getRuntime().exec("C:\\test\\java\\callexe\\test.exe");
}
catch(Exception ee)
{}
}
});
}
public static void main(String args[])
{
test t=new test();
t.setSize(400,400);
t.setVisible(true);
}
}
import java.awt.event.*;
public class test extends Frame
{
Button t =new Button("run program");
public test()
{
add(t);
t.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
try{
Runtime.getRuntime().exec("C:\\test\\java\\callexe\\test.exe");
}
catch(Exception ee)
{}
}
});
}
public static void main(String args[])
{
test t=new test();
t.setSize(400,400);
t.setVisible(true);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货