【问题标题】:How to convert java or class file to exe file [duplicate]如何将java或class文件转换为exe文件[重复]
【发布时间】:2014-09-17 12:25:46
【问题描述】:

我已经使用 swing 创建了一个 java 应用程序,我想将它转换为一个 exe 文件。

public Performance() {
    f = new JFrame("Ticket Booking");
    f1 = new JFrame("Payment Details");
    f2 = new JFrame("Payment Successfull");
    l1 = new JLabel("Movies :");
    l2 = new JLabel("Timing :");
    l3 = new JLabel("Class:");
    l4 = new JLabel();
    l5 = new JLabel();
    l6 = new JLabel("No of Person:");
    l11 = new JLabel("Movies :");
    l22 = new JLabel();
    l33 = new JLabel("Timing :");
    l44 = new JLabel();
    l55 = new JLabel("Class:");
    l66 = new JLabel();
    l77 = new JLabel("No of Person:");
    l88 = new JLabel();
    l99 = new JLabel("Amount:");
    l00 = new JLabel();
    lsuccess = new JLabel("          Thank u For booking Ticket...");
    c1 = new JComboBox(s1);
    c2 = new JComboBox(s2);
    r1 = new JRadioButton("10:00pm");
    r2 = new JRadioButton("1:00pm");
    r3 = new JRadioButton("4:30pm");
    buttongroup = new ButtonGroup();
    b1 = new JButton("Submit");
    b11 = new JButton("Pay Bill");
    b22 = new JButton("Edit");
    t1 = new JTextField(10);
}

【问题讨论】:

  • 发布代码时,请务必发布相关代码...您的代码与您的具体问题有何关联?
  • 这是我的代码的一部分
  • 你想要做的在理论上是可能的,但是非常复杂和笨拙。
  • "如何将java或class文件转换为exe文件" 为什么? Java 有Java Web Start 来启动富客户端应用程序。 JWS 适用于 Windows、OS X 和 *nix。

标签: java swing


【解决方案1】:

要将.class 文件转换(实际上是打包)为.jar 文件,请使用Jar tool。然后,您可以使用 Launch4j、JSmooth 或其他几个软件包等工具从 .jar 生成 .exe 文件(在网上搜索“jar exe”)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多