Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Basics Getting Started with Java Receiving Input

in 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
Stephen Bone
12,359 Points

I'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
Stephen Bone
12,359 Points

Hi 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

I just cant get it to work I keep getting errors for every thing my console wen compiling my challenges I need help

thanks 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