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 trialDavid Hinton
3,070 Pointsjavac: file not found: Example.java
I have followed the video exactly the same
import com.teamtreehouse.Treet;
public class Example{
public static void main(Strings[]args){ Treet treet = new Treet(); System.out.printf("This is a new Treet: %s %n", treet); }
}
But when I try to compile I get the error
treehouse:~/workspace$ javac Example.java && java Example
Picked up JAVA_TOOL_OPTIONS: -Xmx128m
Picked up _JAVA_OPTIONS: -Xmx128m
javac: file not found: Example.java
Usage: javac <options> <source files>
use -help for a list of possible options
2 Answers
David Hinton
3,070 PointsYeah in the teamtreehouse folder I have the Treet file and the Example file , confused :S
Alexander Davison
65,469 PointsTry typing in ls
(with a lowercase L, not the number 1) into the Console.
What do you see?
David Hinton
3,070 Pointstreehouse:~/workspace$ ls
com
Teja Tummalapalli
5,592 PointsTeja Tummalapalli
5,592 PointsHi, Did you execute this snippet in the folder where the example resides?? The place of execution matters as you are providing the relative path for the compiler