“正确编译,但运行时错误”

时间:2018-06-15 18:28:58

标签: runtime

我的java程序正在编译,但在运行时,显示无法找到或加载主类 MultiThreading enter image description here

environment settings and error msg

class MultiThreading extends Thread
{

public void run()
{
    try{
    for(int i=1;i<=10;i++)
    {
        System.out.println("child"+i);
    }
}catch(Exception e)
{
    System.err.println(e);
}
}
public static void main(String[] args) 
{
    MultiThreading t=new MultiThreading();
    t.start();
    try{
    for(int i=1;i<=10;i++)
    {
        System.out.println("child"+i);
    }
    }catch(Exception e)
{
    System.err.println(e);
}
}
}

0 个答案:

没有答案