我有java独立应用程序,我在eclipse中创建了jar文件,当我运行jar文件时,在main方法中执行的main方法声明了最终类(当我运行jar时,这个最后的类构造函数没有被调用)。
这里我提到了主要的方法代码。
final PLTaxEst2014 f = new PLTaxEst2014();
final boolean IsMaxed = true;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JOptionPane.showMessageDialog(null, "hiiiiiiiiiiii"
, "Registration Succeeded", JOptionPane.PLAIN_MESSAGE);
if (f.closeBeforeOpen) {
JOptionPane.showMessageDialog(null, "closed"
, "Registration Succeeded", JOptionPane.PLAIN_MESSAGE);
f.finalShutdown(false);
} else {
JOptionPane.showMessageDialog(null, "else"
, "Registration Succeeded", JOptionPane.PLAIN_MESSAGE);
f.setTitle(f.getClass().getSimpleName());
//instead of standard EXIT_ON_CLOSE, do nothing so can cancel.
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
f.setSize(800, 600);
f.setIconImage(new ImageIcon(getClass().getResource(
"bitmaps/PLicon32B.gif")).getImage());
if (IsMaxed) f.setExtendedState(JFrame.MAXIMIZED_BOTH);
f.setVisible(true);
f.checkRegularAfterLoad();
}
}
}
);
请帮助我!!