public  class  helloworld
{
      public  static  void  main(String[] args)
      {
          System.out.println("aaa");
          }
      }

解决方案 »

  1.   

    public  class  helloworld
    {
          public  static  void  main(String[] args)
          {
              System.out.println("aaa");
              }
          }
      

  2.   

    这样应该对了吧!
    public  class  helloworld
    {
       public  static  void  main(String[] args)
      {
         System.out.println("aaa");
              }
      }
      

  3.   

    class路径不对或classpath没设对。
    这个文件有没有package?
      

  4.   

    将当前路径(.class所在的路径)加入到CLASSPATH环境变量中
      

  5.   

    add "." to your classpath in c:\autoexec.bat:
    set classpath=.;%classpath%or
    add "." to your classpath environment variable why did SUN never fix this problem? this really sucks!
      

  6.   

    在classpath环境加上 “.;”
      

  7.   

    同意jackeroo(人言者) 的说法,
     public    class    helloworld
      {
            public    static    void    main(String[]  args)
          {
                System.out.println("aaa");
                          }
          }
    应该没错,如果不行,那就考虑CLASS路径吧!!
      

  8.   

    exception  in  thread  "main"  java.long.noclassdeffounderror:helloworld/class
    看到没有?你是这样运行的:java helloworld.class
    java把你的helloworld当成包class当成类名了
    所以你应该java helloworld
      

  9.   

    按 jackeroo(人言者)说的修改程序,
    按 karma(无为) 说的设置环境变量,
    运行起来应该就会没什么问题了!
      

  10.   

    哥们,我试过了,在我的机子上面。看源码:
    public class helloworld{
     public static void main(String args[]){
    System.out.println("hello,everyone!");
    }
    }路径是:c:\j2\bin
    class路径也是一样的。
    在那里,你运行一下:c:\j2\bin\java helloworld
    就一切OK了!
      

  11.   

    竟然能够编译通过????
    main(String[] args)java helloworld
      

  12.   

    http://www.csdn.net/Expert/TopicView.asp?id=85391&datebasetype=200101
      

  13.   

    搞清楚了,时java helloworld就可以了