InfinitePower563:
mainメソッドが静的であるので、スタティックにコールすることができなければなりません。そのため、私が使用します。
package prototype.server.main;
import javax.swing.JFrame;
import prototype.server.main.gui.Swing;
public class Runtime {
public static void main(String[] argv) {
Swing swing = new Swing(true, argv[0]);
@SuppressWarnings("unused")
JFrame maingui = swing.getGuiFrame();
}
}
静電気メインコードとして、その後、使用して呼び出します。
import prototype.server.main.Runtime;
public class Main {
Runtime.main(new String{"f"});
}
静的メソッドを呼び出すには、しかし、Eclipseは私にエラーを与えています。助け、事前にあなたに感謝してください。
アフメットOZKESEK:
我々は修正するために必要な2つのバグがあります。
import prototype.server.main.Runtime;
public class Main {
// add constructor, or method that you can call another method
// or make this static { ... } block that fits you
public Main() {
//do not forget [] for array
Runtime.main(new String[]{"f"});
}
}