程序很简单,大概是什么东西没配置好。
错误提示:

VM Started: 
Exception occurred: java.lang.ClassNotFoundException (uncaught)"thread=main", java.net.URLClassLoader$1.run(), line=199 bci=72main[1]程序框中指向:
   throw new ClassNotFoundException(name); 谢谢!

解决方案 »

  1.   

    ClassNotFoundException
    类没有找到
    一般是classpath没有配好,常见的问题是少了一个点 .;
      

  2.   

    ClassNotFoundException
    类没有找到
    一般是classpath没有配好,常见的问题是少了一个点 .;
      

  3.   

    谢谢两位!!
    我用的是:j2sdk1.4.2_04版
    环境变量设置为:
    java_home: c:\j2sdk1.4.2_04
    class_path: .;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar不知有没有错?
      

  4.   

    JCreator无需自己设置变量
    把代码贴出来
      

  5.   

    同意楼上观点 JCreator 中用J2SE 不需要设置,编其他(J2SE以外)的设置也有专门菜单 贴些代码
      

  6.   

    我就直接new一个project 选择Basic Java Application
    然后随便命名一下。
    生成两个文件:
    hhh.java
    其中代码:
    public class hhh {
        
        public static void main(String[] args) {
            // Create application frame.
            HhhFrame frame = new hhhFrame();
            
            // Show frame
            frame.setVisible(true);
        }
    }
    hhhfram.java
    代码:
    import java.awt.*;
    import java.awt.event.*;/**
     * Sample application using Frame.
     *
     * @author 
     * @version 1.00 06/02/17
     */
    public class hhhFrame extends Frame {
        
        /**
         * The constructor.
         */  
         public hhhFrame() {
                    
            MenuBar menuBar = new MenuBar();
            Menu menuFile = new Menu();
            MenuItem menuFileExit = new MenuItem();
            
            menuFile.setLabel("File");
            menuFileExit.setLabel("Exit");
            
            // Add action listener.for the menu button
            menuFileExit.addActionListener
            (
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        hhhFrame.this.windowClosed();
                    }
                }
            ); 
            menuFile.add(menuFileExit);
            menuBar.add(menuFile);
            
            setTitle("hhh");
            setMenuBar(menuBar);
            setSize(new Dimension(400, 400));
            
            // Add window listener.
            this.addWindowListener
            (
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        hhhFrame.this.windowClosed();
                    }
                }
            );  
        }
        
        
        /**
         * Shutdown procedure when run as an application.
         */
        protected void windowClosed() {
        
         // TODO: Check if it is safe to close the application
        
            // Exit application.
            System.exit(0);
        }
    }编译过程中又出来一个URLClassloader.java 问题好像就出在这里。谢谢各位回复!
    我是第一次上这个论坛,没想到大家这么热心!!
      

  7.   

    ------ HhhFrame frame = new hhhFrame();
       错误应该在这里.
    把HhhFrame该为hhhFrame就可以通过了.我是在dos是做的测试.
      

  8.   

    ------ HhhFrame frame = new hhhFrame();
       错误应该在这里.
    把HhhFrame该为hhhFrame就可以通过了.就是哈,类和构造方法的名字必须相同,区分大小写