How to choose main class
Answered
I have a rather odd question that makes me look like a newbie (which I kind of am).
When running a file, I have to specify the main class.
This is my code:
import java.swing.*;
public class Sokoban {
public static void main(String[] args) {
final char[100, 100] Board = new char[100, 100];
final char[100, 100] Position = new char[100, 100];
}
}
But when trying to run this file (as a Java applet), I can select the main method in the form that appears, but the OK button is grayed out. So I cannot run the program.
Anyone got a solution?
And a related question, every time I try to run a program I have to fill out this form. Is there a way to circumecent this?
Thanks!
Please sign in to leave a comment.
@... This is not related to IntelliJ IDEA, but to the application itself.
The error states: Cannot invoke "javafx.scene.control.Button.SetOnAction(javafx.event.EventHandler)" because "this.button"...
So, please inspect and debug your application. If there are no ideas, feel free to post a question on StackOverFlow.