# Solved: javac: file not found: Goodbye.java



## Tomtatomtom (May 29, 2008)

I am a win XP user. I just downloaded the jdk from sun, and adjusted my path to include the \bin directory that it is in. I have written a program in notepad,
public class Goodbye
{
public static void main(String[] args)
{
System.out.println("Auf wiedersehen.");
System.out.println("Da svedana."); 
System.out.println("See Ya!");

}
} 
and saved it as a *.java file. When I go to compile it, I get the File not found error that is the title of this thread.

When I look at My documents I notice that the extensions are hidden, but in the \type\ column it says Java file.

got any Ideas?


----------



## abkTech (Jun 2, 2009)

You seem to have entered wrong file path in command prompt. Try running javac from My Documents (if you aren't) or place the path in quotes as

javac "JAVA FILE PATH HERE"

I hope it solves your problem.


----------



## Tomtatomtom (May 29, 2008)

I tried both of your suggestions, and was met with the same result . Thank you


----------



## Tomtatomtom (May 29, 2008)

If I got NetBeans would I have the same problem?


----------



## abkTech (Jun 2, 2009)

Try adding command prompt shortcut in context menu. Read more about it here. It will ease the typing part. You can then open command prompt from right-clicking the folder where ".java" file is present. You can then just enter the command:

javac Goodbye.java

for compilation. See if it works or not. Also check whether source file name is indeed Goodbye.java by opening it through command prompt or using dir command.

Although NetBeans might solve your problem as you need not type the path for compile and run instructions but if you're looking for using Java for basic programming or learning purpose, a light IDE like JCreator LE would be better. You can gradually move on to NetBeans as it is a feature-rich IDE and might be confusing for beginners.


----------



## Tomtatomtom (May 29, 2008)

all I did was to put my java file into another directory and compile it from there.


----------



## abkTech (Jun 2, 2009)

Did it compiled successfully? May be there is a space in the file path.


----------



## Tomtatomtom (May 29, 2008)

Thank you - everything is working fine. Ive written three more programs and I get the desired output.


----------

