源程序如下:大家帮忙看看有什么问题;
package langexample;
import java.io.*;public class SystemExample{
public SystemExample(){

}
public static void main(String args[]){
System.out.println(System.currentTimeMillis());
System.out.println(System.getProperty("java.version"));
System.out.println(System.getProperty("os.name"));
System.out.println(System.getProperty("os.version"));
System.out.println(System.getProperty("java.vm.name"));
System.out.println(System.getProperty("java.vendor.url"));
System.out.println("-------------------------------------------------");

System.out.println("Please input a number,I'll add ten to it .");
float f1;
try{
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
String s=br.readLine();
f1=Float.parseFloat(s);
System.out.println(f1+10); 
}catch(IOException ioe){
ioe.printStackTrace();
}

}
}

解决方案 »

  1.   

    包的路径不对,是在你的jdk的目录下吗?
      

  2.   

    是呀,我刚装的jsdk2_1.4.0_02
    怎么改?
      

  3.   

    谢谢你,freeleo(粑粑) 
    我把 package langexample; 这一行删了就可以了,
    这是为什么呢?
      

  4.   

    比如说你当前路径是:C:\aaa\bbb\ccc
    你应该把你编译出来的SystemExample.class放在 C:\aaa\bbb\ccc\langexample\SystemExample.class
    然后在C:\aaa\bbb\ccc\敲入  java langexample.SystemExample 就可以通过了。
    你自己要注意package的路径