L
L
Li_Von2017-05-27 22:33:16
Java
Li_Von, 2017-05-27 22:33:16

Why can't the main() method be loaded or found?

classBeen{
. . .
. . .
}
class Be{
public static void main(String args[]) {
Been ob = new Been();
ob.pereob();
ob.array();
}
}
The compilation is successful, but when I run the Be class (java Be.class), the following error is displayed:
Error: Could not find or load main class Be.class
I don't understand because the method is declared... Help :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Ne-Lexa, 2017-05-27
@Li_Von

Remove .class from the command.
java Be

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question