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 trialAlexandra Bonono
9,817 PointsI get"Error: Could not find or load main class karaoke" when I compile the code at the end of the "Implement Chooser UI"
After correcting all the bugs displayed in the cosole after compile the code I get :
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
Error: Could not find or load main class karaoke
This is my main class it is at the same level as the folder "com" under "Java Data Structures - Design the UI":
import com.teamtreehouse.model.Song;
import com.teamtreehouse.model.SongBook;
import com.teamtreehouse.KaraokeMachine;
public class Karaoke {
public static void main(String[] args) {
SongBook songBook = new SongBook();
KaraokeMachine machine = new KaraokeMachine(songBook);
machine.run();
}
}
Please any idea why I get that error?
1 Answer
Alexandra Bonono
9,817 PointsThanks for answering Ronald it is working now, what i did is delete the Karaoke.java and create a new one in different folder until I got it right. What I don't understand is the fact that it was working before.
Ronald Williams
Java Web Development Techdegree Graduate 25,021 PointsRonald Williams
Java Web Development Techdegree Graduate 25,021 PointsYour main class looks fine. Can you screen shot your set up?