Click here to Skip to main content
15,898,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I tried running this code:

Java
public class HelloWorld {

public static void main(String[] args) {
System.out.println("Hello, World");
}

}


I clicked the "compile file" button and no problems appeared, but when I clicked on the "run application for current file" button, I got a pop-up that said: "The following file is missing class or inner class files: "C:\Users\Larry\Downloads\HelloWorld.java" Proceeding before correcting is not recommended." What should I do?
Posted
Updated 13-Apr-13 7:07am
v2

1 solution

With few exceptions, Java expects a class to be contained in a file with exactly the same name as the class. For the code you describe here ("public class HelloWorld(...)"), the compiler wants it to be in a file HelloWorld.java. I suspect that is not the case...
 
Share this answer
 
Comments
morojele 13-Apr-13 14:15pm    
H.Brydon. the java file is also named HelloWorld.java but the problem persists

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900