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 trialJoshua Walczak
10,854 PointsI cannot find my error, can anyone help?
This is the error I keep getting when trying to run Karaoke.java
symbol: class KaraokeMachine
location: class Karaoke
Karaoke.java:9: error: cannot find symbol
KaraokeMachine machine = new KaraokeMachine(songBook);
^
symbol: class KaraokeMachine
location: class Karaoke
3 errors
Here are the snapshots of my work space
4 Answers
Yanuar Prakoso
15,196 PointsHi Joshua
From your snapshot I learned that you have mistake in naming your KaraokeMachine java file. You name it KarokeMachine.java instead of KaraokeMachine.java. Therefore when you call new KaraokeMachine() from your Karaoke class the compiler cannot find it and failed to compile it. Please rename it to KaraokeMachine.java and you will be okay.
I hope this can help a little.
Joshua Walczak
10,854 PointsI fixed the typo and renamed the file but now i am getting this error
javac: file not found: KaraokeMachine.java
Usage: javac <options> <source files>
use -help for a list of possible options
Joshua Walczak
10,854 Pointsand now this
unreported exception IOException; must be caught or declared to be thrown
every error i fix, seems to reveal more :(
Yanuar Prakoso
15,196 Pointscan you give me the link to your workspace?
Joshua Walczak
10,854 Pointsi fixed it. i somehow missed a "throws IOException" after "promptAction"
thank you all for your help and insight
Juthawong Naisanguansee
Full Stack JavaScript Techdegree Graduate 80,724 PointsJuthawong Naisanguansee
Full Stack JavaScript Techdegree Graduate 80,724 PointsThis is the right answer.