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 trialPiyush Dhakan
872 PointsHey Craig. I've actually tried to run all the projects but I always get a null Exception Error. Why So?
I've tried running all the projects in the zipped folder. I'm always getting a Null pointer on line 15 in main.java
Line 15 is : Font.loadFont(getClass().getResource("/fonts/VarelaRound-Regular.ttf").toExternalForm(), 10);
I've searched a lot for this over the internet. But couldn't find a solution. Please help.
2 Answers
Michael Walker
45,428 PointsHello Piyush, I also had the same problem at first. After you import the project, right click on the resources folder in IntelliJ, click on 'Mark Directory As' and then click on Mark as Resources Root as Craig pointed out a couple of videos back. The folder should now be overlapped with a set of a stock of library books (what Craig calls gold coins). After that run Main again and it should work like a charm. :-)
Steve Hunter
57,712 PointsThank you - that worked for me! :-) +1'd
Bill Wolfe
8,428 PointsThanks so much, solved about an hour of frustration.
Lingjian Kong
6,330 PointsThank you Michael? That actually worked for me. Do you know why we should do it?
Tai Do
2,312 PointsAwesome man, thanks for that. You literally saved me from quitting! Worked like a charm.
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsOkay it worked thanks Michael, spent some time on it though before I came across your solution.
Grigorij Schleifer
10,365 PointsGrigorij Schleifer
10,365 PointsThanks Michael,
that worked for me too!