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 Local Development Environments Exploring Your IDE Running Your Code

Kaytlynn Ransom
seal-mask
.a{fill-rule:evenodd;}techdegree
Kaytlynn Ransom
Python Web Development Techdegree Student 11,409 Points

How do I get my karaoke program to read the txt file on NetBeans?

Right now, my entire program is working perfectly except that the Karaoke class doesn't seem to be able to find the txt file I created with the 15 songs in it. I've tried putting the txt file in with the karaoke package, a test package, and in the source code. None of those have worked. Any ideas as to what else I could try or what I'm doing wrong?

1 Answer

You have to manually go the directory, were your netbeans project is saved. Your songs.txt file should be located in the "src" folder. You copy it and paste it one level up, meaning that it should be located in the "Karaoke" folder (where also the "src", "test", "nbproject", ... folders are located). After that your program should work fine.