bhuwansahni bhuwansahni - 4 years ago 176
Java Question

Stanford's Karel the Robot throws NullPointerException

I have started taking the course Programming methodology(CS106A) available at stanford website.
But I am not able to start the Stanford Karel in it.

I am using eclipse indigo classic 3.7.1 and Windows 7 64 bit OS..

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 the 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 followed some instructions given here but then got a blank screen as the output.

The assignment1 of stanford can be found here, and karel the robot of stanford is available here

Answer Source

You are getting that error because you are not using the Eclipse version provided by the Stanford University. For more detailed information,

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download