Java虚拟机是用来运行Java Applet和Java应用程序的引擎!它与平台无关,可以理解成与平台相关的文件格式,并能在不同的平台上运行由编译器产生的类文件,因此,在一个平台上生成的类文件就能(借助于Java虚拟机)在不同的平台运行了。如常用的tomcat5、weblogic等!

解决方案 »

  1.   

    1.JVM只是一个简单的字节码解释器,是由C语言实现的吧
    2.在程序中你定义main方法的时候不需要指定类前缀
      

  2.   

    Java Tutorial中关于main方法的说明:
    The main Method 
    The first bold line in the following listing begins the definition of a main method. 
    /** 
     * The HelloWorldApp class implements an application that
     * simply displays "Hello World!" to the standard output.
     */
    class HelloWorldApp {
        public static void main(String[] args) {
            System.out.println("Hello World!"); //Display the string.
        }
    }
    Every Java application must contain a main method whose signature looks like this: public static void main(String[] args)The method signature for the main method contains three modifiers: 
    public indicates that the main method can be called by any object. Controlling Access to Members of a Class covers the ins and outs of the access modifiers supported by the Java language. 
    static indicates that the main method is a class method. Understanding Instance and Class Members talks about class methods and variables. 
    void indicates that the main method doesn't return any value. 
    How the main Method Gets Called 
    The main method in the Java language is similar to the main function in C and C++. When the Java interpreter executes an application (by being invoked upon the application's controlling class), it starts by calling the class's main method. The main method then calls all the other methods required to run your application. 
    If you try to invoke the Java interpreter on a class that does not have a main method, the interpreter refuses to run your program and displays an error message similar to this:In class NoMain: void main(String argv[]) is not defined