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 trialDhruv Patel
8,287 PointsCLASSPATHS -cp
Can someone please explain to me what a classpath is, I've explored around a lot and still don't know what it is.
2 Answers
Craig Dennis
Treehouse TeacherHi Dhruv!
A classpath essentially tells your program where to look for it's additional code. By default that is just the current directory. If you want it to look elsewhere, like in another folder, you need to specify that folder. It's very similar to PATH in most Operating Systems.
Does that help?
Dhruv Patel
8,287 PointsThank you for the answer Craig.
Craig Dennis
Treehouse TeacherGlad it helped!
Keep at it!
Matthew Francis
6,967 PointsMatthew Francis
6,967 PointsHey Craig,
I'm in the "IDE(InteliJ) Introduction", just referencing back.
With the video's code, do you know why you don't have to force a classpath in an IDE? but it is required to do so in the workspace so it does not return a "."?