0

I tried to execute ./window in the /Dropbox/src4m directory and encountered the following error message:

jharvard@appliance (~/Dropbox/src4m): make window
clang -ggdb3 -O0 -std=c99 -Wall -Werror -o window window.c -lcs -lm
jharvard@appliance (~/Dropbox/src4m): ./window
java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:218)
    at stanford.spl.JBEWindow.<init>(JBEWindow.java:40)
    at stanford.spl.JavaBackEnd.createWindow(JavaBackEnd.java:169)
    at stanford.spl.GWindow_create.execute(JBECommand.java:190)
    at stanford.spl.JavaBackEnd.commandLoop(JavaBackEnd.java:625)
    at stanford.spl.JavaBackEnd.run(JavaBackEnd.java:164)
    at stanford.spl.JavaBackEnd.main(JavaBackEnd.java:136)
Unexpected error: null
^C

No window appeared. I can't follow further steps to solve breakout due to this error.

What caused this error and how can I resolve it?

Note: Currently running the 2014 version itself

jharvard@appliance (~): appliance50 -v
2014-24
jharvard@appliance (~):

Tried running update50 still nothing java -version before and after update50

jharvard@appliance (~): java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK Client VM (build 24.65-b04, mixed mode, sharing)
jharvard@appliance (~): update50     
Updating appliance. Please do not turn off your computer or put it to sleep!
Updating sources...
Reinstalling appliance package...
Upgrading packages...
Reinstalling appliance package again...
Update complete!
jharvard@appliance (~): java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK Client VM (build 24.65-b04, mixed mode, sharing)
5
  • Thanks for the reply but am running the 2014 version itself running appliance50 -v gave me 2014-24
    – pfalcon
    Jan 14 '15 at 3:34
  • try update50 (if you're lucky it may have been a bug in the appliance, already taken care of;)
    – abelinux
    Jan 14 '15 at 3:37
  • BTW, what's the output for java --version right now? (I mean, before update50)
    – abelinux
    Jan 14 '15 at 3:40
  • running java -version gave me OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1) before and after the update50
    – pfalcon
    Jan 14 '15 at 4:45
  • 1
    have you made any changes to window.c? Or did you make the version that was in the zip file? (I just did all this and it works fine... I have the exact same java version as you.) Did you run any updates in the appliance (other than update50?) I'm confused why your prompt says jharvard@appliance I would expect jharvard@ubuntu
    – curiouskiwi
    Jan 14 '15 at 7:50
0

From jharvard@appliance shown in your terminal output, I assume you've dowloaded version 19 of the appliance (you should see 19-x on you task bar, lower right).

Such appliance was developed for version 2014 of the course. If you're using 2015 version of distro codes (the pset dowloads), you should get yourself the new CS50 2014 Appliance.

The reason behind your error is that spl library is compiled for use on a certain OS (in this case, a certain version of Linux), and won't run on any other properly. You've downloaded 2015 version of spl, compiled to run in Ubuntu appliance, but now you're trying to run it in Fedora appliance. Therefore the error.

2
  • Running 2014 version itself
    – pfalcon
    Jan 14 '15 at 3:29
  • My bad, I haven't tried appliance 2014 yet, and had seen previous posts where it's prompt was jharvard@ubuntu, that's why my wrong guess.
    – abelinux
    Jan 14 '15 at 3:35

Not the answer you're looking for? Browse other questions tagged .