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

javac : file not found

It won't find the class i wrote. Please someone a little bit of help ?

1 Answer

Grigorij Schleifer
Grigorij Schleifer
10,363 Points

Hi Enes,

what is the name of the class?

The terminal syntax should be "javac classname.java && java classname"

  • "classname" need to be exact like your name of the class in the code
  • upper or lowercase need to be correct

Could you paste your code ?

Grigorij

import java.io.Console;

public class M_String { public static void main (String args []) { Console cons = System.console(); String name = cons.readLine("What is your name ? "); cons.printf(" I'm %s ! \n", name); cons.printf("%s is coding in Java !\n",name); } }

I saved it like required M_String.html and when i wanna compile it i type as required javac M_String.java but it shows me that error.