为什么用 java 制作的 exe 文件会立即关闭?
Why does an exe file made with java immediately turn off?
我在eclipse中做了一个jar,从jsmooth转成了exe。
exe 已创建,但如果我双击它,它会立即关闭。
我的代码有问题吗?
public class plz {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello World!");
for(int i = 0; i< args.length; i++) {
System.out.format("args[%d}: %2 %n", i, args[i]);
}
}
}
是的,是的。
您的代码声明它应该循环遍历参数列表(您在启动应用程序时提供)。完成后,应用程序将停止。
我在eclipse中做了一个jar,从jsmooth转成了exe。 exe 已创建,但如果我双击它,它会立即关闭。 我的代码有问题吗?
public class plz {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello World!");
for(int i = 0; i< args.length; i++) {
System.out.format("args[%d}: %2 %n", i, args[i]);
}
}
}
是的,是的。 您的代码声明它应该循环遍历参数列表(您在启动应用程序时提供)。完成后,应用程序将停止。