geoffricho
geoffricho

Reputation: 31

Karel screen is blank when trying to run in Eclipse on Mac

I'm currently doing the online CS106A Stanford course. As part of this I need to install Eclipse and get Karel running

I installed Eclipse using their up to date version of Eclipse, installed using instructions from here: https://web.stanford.edu/class/cs106a/eclipse.shtml , I also installed Java using the same instructions.

I am trying to launch Karel and get it running However I get a blank screen as seen here

Any ideas on how to fix this? I am running Java 8 Update 121

Upvotes: 3

Views: 2422

Answers (4)

mikeybkats
mikeybkats

Reputation: 23

To resolve this issue install an older version of Java.

If you're on a mac Homebrew makes it easier to download and install different versions of java. Examples here: https://gist.github.com/gwpantazes/50810d5635fc2e053ad117b39b597a14

I was running into the same problem(blank screen) as the initial poster when trying to run Karel the robot with the newest version of Java. It ran correctly when I switched to java version 6.

After installing a different java JDK set the compiler of your java IDE to use the correct version of java

Consider using a java version manager to make it easier to switch versions. I'm on a mac so I used jenv – https://www.jenv.be/

There is a post on medium here for more info on using jenv that was helpful – https://medium.com/@brunofrascino/working-with-multiple-java-versions-in-macos-9a9c4f15615a

Upvotes: 1

rosnk
rosnk

Reputation: 1098

2019 standford assignment folder has file name called spl.jar.

In order to run old file, replace karel.jar with spl.jar and rename spl.jar to karel.jar, it should work.

Upvotes: 0

G. G. Diaz
G. G. Diaz

Reputation: 41

For updated reference, Anonymous's answer also worked for me, at least for the initial Karel assignment, and I'm also using Java 1.8 downloaded from the current-day CS106A sites.

What worked for me: (a) renamed the karel.jar file that came with the SEE assignments to karel_old.jar, and then (b) copied in the jar of the Blank Karel Project at: https://web.stanford.edu/class/cs106a//resources/BlankKarelProject.zip

to the Assignment 1 project and renamed it to karel.jar (from the Finder - am on a Mac). Good luck!

Upvotes: 4

Anonymous
Anonymous

Reputation: 1

I actually stumbled upon the issue, just recently. If you get the assignments from Stanford SEE Website, and installed the Eclipse from the Current Stanford Class Website, (like, in my situation, it was because I'm running on Windows 10 Pro, and I need the x64 Eclipse version as the one in Stanford SEE Website is based on the old x32 Eclipse version) you have to get or download the assignments from Current Stanford Class Website instead. Try to use those assignment files as your working assignment files or replace the karel.jar file in the Stanford SEE Website's assignment files with the karel.jar file from Current Stanford Class Website's assignment files. In my case, it worked like charmed.

My JDK/JRE running version info: 1.8.

*PS: Sorry with the redundant wording of the "assignment files".

Upvotes: 0

Related Questions