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 trialwill cooksey
589 Pointsin my console nothing can compile I get file not found
in my console nothing can compile I get file not found
3 Answers
Stephen Bone
12,359 PointsI'm not sure what error in your code would throw a file not found error message during the compile to be honest. It would be a huge help in assisting you if you could copy and paste your code here.
Below is a copy of the code I have at this stage. If you can't copy and paste your code here (for some reason) perhaps you could compare the two to see where you may be going wrong or even replace your code with mine and try to compile it instead.
Contents of the Introductions.java file:
import java.io.Console;
public class Introductions {
public static void main(String[] args) {
Console console = System.console();
// Welcome to the Introductions program! Your code goes below here
String firstName = console.readLine("What is your name? ");
console.printf("Hello, my name is %s\n", firstName);
}
}
Console command to compile and run the code:
javac Introductions.java && java Introductions
Hope it helps!
Stephen
Stephen Bone
12,359 PointsHi Will
As you haven't posted the command you're using I'm going to take a shot in the dark and say remember you must type the filename with the correct capitalisation.
As in you should be typing the below: (Note the capital "I")
javac Introductions.java
Hope it helps although if I've guessed wrong if you could post what you're typing I may be able to assist further.
Stephen
will cooksey
589 PointsI just cant get it to work I keep getting errors for every thing my console wen compiling my challenges I need help
will cooksey
589 Pointsthanks it tried that but it still does not work I am getting and error is it something in my code or just what Im typing n the console any other help would be great