0

I am getting an Error Could not find or load main class...

I have entered the correct syntax to run this file.

package MainPack;
import mypack.Checker;
import java.util.Scanner;
class Start
{
    public static void main(String[] args)
    {
    BeginCheck bc=new BeginCheck();
    }
}
class BeginCheck
{   
    BeginCheck()
    {
        Checker checker=new Checker();
        checker.CheckAndDisp();
    }
}

The syntax i entered in Command Prompt is:

javac MainPack\Start.java
java MainPack\MainPack.Start

There is no problem with compilation. But i get error on running the program.

How do i resolve this?

Malwinder Singh
  • 6,644
  • 14
  • 65
  • 103

0 Answers0