1

実行可能な Jar をエクスポートしようとしましたが、実行されませんでした。問題はcould not find main method for given launch configuration、起動構成で Main クラスを指定したことです。Mainこの目的のために、メインメソッドを含むクラスの名前を変更しました

ここに画像の説明を入力

main メソッドを含む Main クラスを指定しましたが、それでも jar ファイルは実行されませんか?


私のMainクラス

public class Main {


        static Preferences userPreferences = Preferences.userRoot();
        final static String LOGIN_KEY = "login_key";
        .....................

        public static void main(String [] args) {
            Runnable r = new Runnable() {
                public void run() {
                    try {
                        createGUI();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }


            } ;

            javax.swing.SwingUtilities.invokeLater(r);

        }

    public static  void createGUI() throws IOException {

        JFrame j = new JFrame("C Manager");
        j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        ActionListener al = new ActionListener() {
            @SuppressWarnings("deprecation")
            public void actionPerformed (ActionEvent e ) {
        ......................

    }



}
4

1 に答える 1