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 Importing External Code

Why can't I import 'com' folder on IntelliJ?

Hi there, I'm working on Craig's Learn Java course, and we're importing all our files into IntelliJ. I was able to import songs.txt into the main root without any problem. But when it came to placing the com package in there, it wouldn't let me place it in the src. So then I took all the necessary files and dragged them separately into the src folder, instead of the entire com package. I sure have access to all my files this way, but I'm not sure if this will work for what we're doing. Could you help me? Thanks guys!

4 Answers

Brian Pedigo
Brian Pedigo
26,783 Points

Unzip the downloaded project. Try to import from the top level folder. That way the intended folder system will stay as Craig had it

Thanks, I just now figured out that I need to extract the folder.

kabir k
kabir k
Courses Plus Student 18,036 Points

Can you explain what you mean? I'm getting an error doing it exactly as Craig did his

Thanks-- That was driving me crazy, too! I thought I had extracted it already because it let me pull some of the contents over, but I guess not...

Luis Garcia
Luis Garcia
1,552 Points

Hi Gabriel,

Do you care to share the details on how you extracted the folder?. I double-clicked on the .zip file to get it extracted, yet every time I try to drag and drop the files into IntelliJ, it becomes irresponsive.

Cheers, Luis

Luis Garcia
Luis Garcia
1,552 Points

Hi Gabriel,

Do you care to share the details on how you extracted the folder?. I double-clicked on the .zip file to get it extracted, yet every time I try to drag and drop the files into IntelliJ, it becomes irresponsive.

Cheers, Luis