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 trialSameer Rao
490 Pointsjavac File not found / Package com doesnt exist
I am wondering how Craig's Programm ran over here, i am getting "file not found error" if i compile Example.java from /home/treehouse/workspace.
However if i change my directory to /home/treehouse/workspace/com , i get the below error "error:package com doesnt exist"
Jennifer Nordell
Treehouse TeacherHi there! Could you post a snapshot of your workspace so we can take a look? Thanks
Frederick Reiss
15,003 PointsAfter performing javac Example.java type the following command "ls"
Do you see a list like this: com Example.class Example.java
Now if you don't see this list the folder structure is wrong.
In the video Craig had us create in our own Workspace the folder named "com", then a sub folder that was named: teamtreehouse and then the file: Treet.java
The "ls" command that I am using is from linux.
You can traverse down/up the folder structure using commands: "cd <folder name>" or up "cd .."
Again for the compile to work correctly the user needs to see the list in step 2. If this help let me know. -fred
Sameer Rao
490 PointsSameer Rao
490 PointsPlease find my Example.java and Treet.java files.
Example.java
import com.teamtreehouse.Treet ;
public class Example {
public static void main (String[] args) {
}
}
Treet.java
package com.teamtreehouse;
public class Treet {
}