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 trialYoussef Khaky
1,871 PointsWhat is a package does not exist error?
I get these errors
Example.java:1: error: package com.teamtreehouse does not exist
import com.teamtreehouse.Treet;
^
Example.java:6: error: cannot find symbol
Treet treet = new Treet();
^
symbol: class Treet
location: class Example
Example.java:6: error: cannot find symbol
Treet treet = new Treet();
^
symbol: class Treet
location: class Example
3 errors
Thanks
2 Answers
Ryan Ruscett
23,309 PointsHey,
packages you use the keyward. "package" Not import.
package com.example;
That is how you add the package. Then once the packages is added, you can import things from it.
does the make sense?
Jacek Bialek
18,225 PointsHello, i have the same problem..
Example.java:1: error: package com.teamtreehouse does not exist import com.teamtreehouse.Treet; ^ Example.java:6: error: cannot access Treet Treet treet = new Treet(); ^ bad source file: .\Treet.java file does not contain class Treet Please remove or make sure it appears in the correct subdirectory of the sourcepath.