This site requires JavaScript, please enable it in your browser!
Greenfoot back
Game/maniac
Game/maniac wrote ...

2021/5/2

Setting up Greenfoot in IntelliJ

Game/maniac Game/maniac

2021/5/2

#
I'm busy trying to setup Greenfoot in IntelliJ for development. I have gotten as far as completing all the tasks in the NetBeans instruction: https://www.greenfoot.org/doc/running_on_netbeans These instructions seem to be outdated for JDK 11, since JavaFX no longer comes bundled with the JDK. I have setup a global library for JavaFX, however I am now getting an error, which I'm unsure how to resolve: "Error: JavaFX runtime components are missing, and are required to run this application" It appears to be that the greenfoot library is missing a module-info.java file, however the Greenfoot IDE has no issues compiling my code with JDK 11, so there must be a solution to this problem.
Game/maniac Game/maniac

2021/5/2

#
UPDATE: I've been working with RcCookie to figure this out. So far we have fixed the error with JavaFX runtime components, using some VM options. Now we have another error that is haunting us.
java.lang.ClassNotFoundException: main.class
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at greenfoot.export.GreenfootScenarioViewer.<init>(GreenfootScenarioViewer.java:150)
	at greenfoot.export.GreenfootScenarioApplication.start(GreenfootScenarioApplication.java:39)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run$$$capture(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java)
Game/maniac Game/maniac

2021/5/3

#
WE'VE FINALLY FIGURED IT OUT! Documentation coming soon...
You need to login to post a reply.