工具
https://exe4j.apponic.com exe4j可以把jar转成exe
例子
测试代码:
public class TestWindow extends JFrame {
public TestWindow(String title
) {
JFrame jf
= new JFrame(title
);
Container conn
= jf
.getContentPane();
JLabel L1
= new JLabel("Hello,world!");
conn
.add(L1
);
jf
.setBounds(200, 200, 300, 200);
jf
.setVisible(true);
jf
.setDefaultCloseOperation(DISPOSE_ON_CLOSE
);
}
public static void main(String
[] args
) {
new TestWindow("窗口");
}
}
IDEA把测试代码打成jar包使用exe4j把jar转成exe 01 创建一个文件夹,放入jar文件、jre(必须要有jre)等 02 03 04 05 06 07 08一直下一步,生成exe
总结
熟悉Java开发的同学想做windows桌面程序,有了exe4j就可以不用去学c#了