Java – Stanford robot Karel throws NullPointerException

I have started to learn the programming method (cs106a) course on Stanford website

I use eclipse indigo classic 3.7 1 and windows 7 64 bit operating systems

I wrote the following code:

import stanford.karel.*;

public class CollectNewspaperKarel extends SuperKarel {
    // You fill in this part
    public void run(){
      move();
      move();
    }
}

It gives an error

Exception in thread "main" java.lang.NullPointerException
   at acm.program.Program.main(Program.java:917)
   at stanford.karel.Karel.main(Karel.java:202)

I gave some instructions here, but then output a blank screen

Stanford's task 1 can be found here, while Stanford's robot Carlyle can be found here

Solution

You receive this error because you are not using the version of eclipse provided by Stanford University For more details,

Follow this Stanford Karel Setup Guide, which will solve your problem

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>