Command Prompt cannot find class in my Java program
Closed
zlloyd1
Posts
10
Registration date
Tuesday December 11, 2012
Status
Member
Last seen
February 4, 2013
-
Dec 11, 2012 at 12:38 AM
shoaibista Posts 8 Registration date Friday May 24, 2013 Status Member Last seen May 27, 2013 - May 24, 2013 at 11:10 AM
shoaibista Posts 8 Registration date Friday May 24, 2013 Status Member Last seen May 27, 2013 - May 24, 2013 at 11:10 AM
Related:
- Command Prompt cannot find class in my Java program
- Minecraft java edition free download - Download - Sandbox
- Rename computer command prompt - Guide
- Cs 1.6 money command - Guide
- Disable deep freeze from command prompt - Guide
- Command prompt message to another computer - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Dec 12, 2012 at 06:43 PM
Dec 12, 2012 at 06:43 PM
you class is not in the path. Java is unable to find the class
most common way would be that you change dir to the location of the file and then execute the program
most common way would be that you change dir to the location of the file and then execute the program
shoaibista
Posts
8
Registration date
Friday May 24, 2013
Status
Member
Last seen
May 27, 2013
May 24, 2013 at 11:10 AM
May 24, 2013 at 11:10 AM
->javac guihelloworld.GUIHelloWorld
try this
try this
Dec 12, 2012 at 08:03 PM
public static void main(String[] args){
JOptionPane.showMessageDialog(null, "HELLO WORLD");}}
So, I cannot for the life of me figure out what is the problem resulting in this error....
Dec 13, 2012 at 12:37 PM
package guihelloworld;
So the class must reside in folder "guihelloworld"
Other issue with your code is
/ * HELLO WORLD Interface*/
there cannot be space between / and * for it to be a comment
try this. I have removed your package statement. So now if you cd to the location of the compiled class and run the
javac GUIHelloWorld
it would word