- class American extends Human{
- void country(){
- say("我是American");
- }
- void nation(){
- say("我是Injun");
- }
- }
- class Britisher extends Human{
- void country(){
- say("我是Britisher");
- }
- void nation(){
- say("我是Gael");
- }
- }
- class Aa {
- public static void main(String[] args){
- Human[] h={new Chinese(),new American(),new Britisher()};
- for(int i=0;i<3;i++){
- Human p= h[i];
- p.country();
- p.nation();
- }
- }
- }
复制代码 编译正常,在运行的的时候系统饱报错说
Registry key'Software\JavaSoft\Java Runtime Environment\CurrentVer
has value'1.4',but'1.5'is required.
Erro: could not find java.dll
Erro: could not find java 2 Runtime Environment.
我的JDK是1.5的啊.不知道那里错了
我的环境变量设置的是: classpath: .;D:\编译\Java\jre1.5.0_11\lib
path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL.;D:\编译\Java\jdk1.5.0_11\bin |
|