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 trialStephanie Youstra
18,513 Points"Package does not exist" ... but only when using text editor
To help give me a "permanent record" of my work, I'm following along using a text editor and saving to GitHub rather than using Workspaces. In the https://teamtreehouse.com/library/java-data-structures/getting-there/packages video, however, I'm getting the Example.java:1: error: package com.teamtreehouse does not exist
error when I try to compile the work from my text editor. HOWEVER .... when I did a straight-up copy/paste into Workspaces (making sure even the folders matched perfectly) ..... everything worked beautifully. What magic does Workspaces have?
Alan Michels
15,645 PointsThank you Stephanie. I am also using a text editor to write the the. The instructor should should fix the tutorial.
3 Answers
Jaanus Rebane
10,215 PointsThank you Stephanie for the solution. I was confused as well.
Salim ALmughairi
Courses Plus Student 51 PointsThanks Stephanie.
Jacek Bialek
18,225 PointsThx;)!
Stephanie Youstra
18,513 PointsStephanie Youstra
18,513 PointsSo, after much wondering & googling, I tried moving my Example.java up one more folder (NEXT TO the
com
folder, as opposed to inside thecom
folder), and that seemed to work ..... even though it looked like the same file structure as the one shown in the demo. Maybe a note in the Teacher's Notes about the folder structure? Just saying "Add a new file in the default package" is a little tricky when you're just beginning to learn about packages and it looks like it's being added to the com folder.