Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application Graphical User Interfaces Getting Started

Ilya Gladkih
Ilya Gladkih
620 Points

IntelliJ cant use Group and writes an error.

Error:(16, 9) java: cannot find symbol symbol: class Group location: class sample.Main

1 Answer

Seth Kroger
Seth Kroger
56,414 Points

Make sure there's an import for javafx.scene.Group on your source.

Ilya Gladkih
Ilya Gladkih
620 Points

That worked but still writes about another problem:

Exception in thread "main" java.lang.ClassNotFoundException: sample.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)

Ilya Gladkih
Ilya Gladkih
620 Points

Found the problem. Had to change in project settings CTRL+SHIFT+ALT+S at MODULES to Use module compile output path. Reason for the problem was that IDE did not pass the path to ".class" files for complier.