可能是:
1、环境变量设置错误;(http://www.cnblogs.com/seanpasssssss/archive/2013/06/06/3122557.html)
2、java程序文件中有包存在,编译失败;
3、java程序文件中有包存在,编译没问题,在执行时输入格式错误。
假设生成的.class文件放入.\org\ds\demo中,在执行时正确的格式为:
java org/ds/demo/hello 或者
java org.ds.demo.hello
而不是
java org\ds\demo\hello