unnamed package does not match directory C:\Documents and Settings\dl\jbproject\learnjsp\src\login\User.java.
+++++++++++++++++++++++++++++++++++++++++++++++++
包名声明错误吧,把你的User.java帖出来看看

解决方案 »

  1.   

    class Measurement{
     boolean t;
     byte b;
     short s;
     int i;
     long l;
     float f;
     double d;
     void print()
     {
       System.out.println(
          "Data type     Initial values\n"+
          "boolean     "+ t +"\n"+
          "byte        "+ b+"\n"+
          "short       "+ s+"\n"+
          "int         "+i+"\n"+
          "long        "+l+"\n"+
          "float       "+f+"\n"+
          "double      "+d );
     }
    }
    public class User{
     public static void main(String[] args){
     Measurement d=new Measurement();
    d.print();
    new Measurement().print();
    }
    }
      

  2.   

    add package declare to the fisrt line of java filepackage login;