0

For a school assignment I am making a desktop game in java. Using a game engine this would be easy enough the only problem is I have to use javaFX and since javaFX hijacks the the main entry-point of the application it would be nearly impossible to combine javaFX with a game engine like lets say LibGDX. So I was wondering would it be possible to run a second entry point from the first javaFX application with the game engine to be able to still use javaFX as a GUI?

timwashere
  • 39
  • 11
  • You mean like have 2 `main()`s? I don't think that's possible, but I have a hard time believing that javaFX doesn't have some equivalent. – CodeChimp Mar 26 '14 at 20:11
  • the thing is there are tons of alternatives to javafx the problem however is that I am forced to use javaFX on this project by school – timwashere Mar 26 '14 at 20:14
  • javaFX seemingly has an "entry point". According to the JavaDocs, there is an `init()` method that gets called first to allow you to initilize things, then a `start()` method that is called to actually start the program. Why can you not use one of them? For reference, this is where I found it: http://docs.oracle.com/javafx/2/api/javafx/application/Application.html – CodeChimp Mar 26 '14 at 20:53
  • I have seen, that you can start an lwjgl game inside a JFrame: http://stackoverflow.com/questions/21253405/how-to-put-properly-a-libgdx-application-inside-swing-application I think it should go with JavaFX to. – Robert P Mar 27 '14 at 07:05

0 Answers0