Results 1 to 2 of 2
  1. #1
    eXistenZ is offline Member
    Join Date
    Mar 2011
    Posts
    7
    Rep Power
    0

    Default Yahtzee: yahtzeelib.jar not recognized (Stanford CS106A Assignment5 online)

    Yahtzee: yahtzeelib.jar not recognized (Stanford CS106A Assignment5 online)


    Self studying those webinars from Stanford. In the first course, Assignment 5 is to develop a Yahtzee program (using GUI classes given to you in yahtzeelib.jar).

    From course webpage, Assignment5.zip download contains starter code for 2 classes and an acm.jar (student-grade Java platform?) and yahtzeelib.jar (GIU classes).

    When I import Assignment5.zip and correct the package reference, the starter code does not recognize YahtzeeDisplay class. I have yahtzeelib, acm, and karel jar files in project, and they are recognized (“Project / Properties / Java Build Path / Libraries / yahtzeelib.jar - <project name>/src/assignment5”). I believe that I followed dev.Eclipse.org instructions, but still I am stuck.

    (Have never tested to see if karel.jar works; skipped the robot games.)

    Have tried: “Window / Preferences / Java / Build Path / Classpath Variables / added: Name = YAHTZEELIB, Path = E:/Eclipse Workspace/Stanford106A/src/assignment5/yahtzeelib.jar” but I don’t know why I tried that.

    Package Explorer: <project name> / yahtzeelib.jar / (default package) [parens exist] / YahtzeeDisplay.class [and so on], so yahtzeelib is located at same level in PackExpl as acm.jar.

    The Problem:
    In the starter class, ivar “private YahtzeeDisplay display;” cannot be resolved to a type; yet YahtzeeDisplay is a class clearly found in yahtzeelib.jar.

    So, how does one import jars of classes, and get the IDE to find them for you? What am I overlooking?

    Using Stanford CS106A version of Eclipse 3.2, JDK 6.0, Build Automatically.

    Thanks.

  2. #2
    eXistenZ is offline Member
    Join Date
    Mar 2011
    Posts
    7
    Rep Power
    0

    Default Stanford CS106A "Projects"

    I reread the initial instructions at the start of the course.

    I had some idea of Java from Head First and Horstmann, using Eclipse, and I didn't want to learn something I would never use (Karel the Robot framework) so I skipped the first Assignment.

    The Assignments are to be imported as PROJECTS.

    I set up the CS106A course as one big Project with each Assignment as its own Package. Apparently, they expect the entire Stanford version of Eclipse to be used for the entire course. The Workspace is the course, and each Assignment is a Project. I am studying online -- not a Stanford student. Each PROJECT is to be submitted using that special button on the toolbar (Importing Projects, Submitting Projects).

    I still don't understand why you can't add a jar / library and have access to those classes, within separate packages, all within the same project. . .


    Thanks for the use of Java Forums, FYI, and good luck to others who may be stuck.


    . . . at least this appears to be the problem so far.

Similar Threads

  1. CS106A Stanford University
    By Learning Java in forum New To Java
    Replies: 116
    Last Post: 07-09-2011, 04:43 PM
  2. Stanford CS106A, my work- your thoughts?
    By chmza in forum New To Java
    Replies: 2
    Last Post: 12-02-2010, 05:53 PM
  3. BigInteger Rational (CS106A-Stanford university)
    By ccie007 in forum New To Java
    Replies: 16
    Last Post: 10-01-2010, 07:16 PM
  4. Class exercise CS106A (Stanford university)
    By ccie007 in forum New To Java
    Replies: 2
    Last Post: 09-11-2010, 01:47 AM
  5. How to run java class in ECLIPSE(CS106A Stanford)
    By ccie007 in forum New To Java
    Replies: 17
    Last Post: 09-11-2010, 12:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •