I
I
IZek1232019-08-19 14:14:34
Java
IZek123, 2019-08-19 14:14:34

How to fix error?

import javax.swing.JOptionPane;

class ShowMeAWindowsDemo{
    public static void main (String[] args){
        JOptionPane.showMessageDialog(null,"lol!" );
    }
}

Error: Could not find or load main class showmeawindowapplication.ShowMeAWindowApplication

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2019-08-19
@TonyWrong

The class name in Java must exactly match the file name (case sensitive). In your case, the file should be called ShowMeAWindowsDemo.java .
It is also worth checking whether this file is really in the showmeawindowapplication package (folder)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question