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 trialChristina Vieau
679 PointsError when trying to compile PezDispenser
My code reads the same as the teacher's so I am not sure what the trouble is. My error message reads: Error: Main method not found in class PezDispenser, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
I did try to fix my error by adding the "public static void main(String[] args)" under the class PezDispenser line and above it but I just kept getting more error messages.
I had a similar error the other day but somehow I managed to get it to run, no such luck today. Any help would be greatly appreciated! I cannot figure out how to paste the screen shot I took of my code, sorry.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsScreenshots are not very useful for identifying any but the most obvious errors. But a snapshot allows full replication of your issue. Take a look at this video about sharing a snapshot of your workspace.