Not sure if this worked in 2015, but now the answer gives me the same "does not contain a main type error" as when using Application.launch(TheClass.class) in a separate class. If I put just a system out into the main, then it is found (in Eclipse), and it also works flawlessly when started from the terminal. Using Java FX dependencies via Maven.
I think you need the Eclipse workaround for starting JavaFX applications. Simply add the following to the class which extends javafx.application.Application:
public static void main(String[] args)
{
launch(args);
}
Application.launch(TheClass.class)in a separate class. If I put just a system out into themain, then it is found (in Eclipse), and it also works flawlessly when started from the terminal. Using Java FX dependencies via Maven.