Display a dialog box with Java Error

In this Tutorial we want to describe you a code that help you in
implementation of dialog box with Java Error. For this we have a class name
could_not_find_mainclass.Inside the main method we print the
"couldnotfoundthemainclass"using System.out.println.On the execution
of a program using javaw ,the program code display a dialog box name Java
Virtual Machine launcher along with error icon and a text printed by the
System,out.println.
Could_not_find_mainclass.java
import java.util.*;
public class Could_not_find_mainclass {
public static void main(String[] args)
{
System.out.println("Couldnot find main class");
}
}
|
Output
For removing this error you have to write java Could_not_find_mainclass.java instead of java Could_not_find_mainclass.java in the console.
Download code

|