Results 1 to 6 of 6
  1. #1
    rich197803 is offline Member
    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Default Import fit.ColumnFixture - cannot be resolved

    Hi,

    I am attempting to setup Fitnesse using a very simple java based programme. I am using DR Java to edit the code.

    The code is very simple, and is attempting to extend a class provided by fitnesse.

    The java file I have created is called rightTriangle.java and is located d:\various directories...\examples\myFixtures\

    The code is below, but when I compile it tells me:

    Error: The import fit.ColumnFixture cannot be resolved

    I am sure the issue is that it can not find ColumnFixture, but I am struggling to find out how to tell it where it is (It is in a java file called fitnesse.jar, that I have located in the same directory, in child directory, and in a parent directory, all to no avail).

    I am at the point in a newbie life where I am physically pointing my monitor at my laptop screen and screaming 'look, it's there, I can see it'. Any help very much appreciated.

    Java Code:
    package myFixtures;
    
    import fit.ColumnFixture;
    
    public class rightTriangle extends ColumnFixture
    {
      public double a;
      public double b;
      public double c;
      public boolean right()
      {
        return (a*a+b*b)==(c*c);
      }
    }
    Last edited by rich197803; 11-29-2012 at 04:27 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Import fit.ColumnFixture - cannot be resolved

    This is a classpath thing, and one of the reasons I generally recommend compiling from the command line for your first few apps so you know what the IDE is doing under the hood.

    Anyway, you need to find out how to add the jar file to your projects classpath, and I don't know Dr Java so can't really say.

    Quote Originally Posted by rich197803 View Post
    I am at the point in a newbie life where I am physically pointing my monitor at my laptop screen and screaming 'look, it's there, I can see it'.
    I do that with anything involving networking.
    Things are a lot better these days, but printers were the bane of my life...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default Re: Import fit.ColumnFixture - cannot be resolved

    Your compiller can't find that .jar file (as you have noticed); it should be mentioned on the CLASSPATH; I don't know how DR Java handes CLASSPATH values so you should check its manual.

    kind regards,

    Jos

    ps. and who's the slowest old sod again?
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    rich197803 is offline Member
    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Default Re: Import fit.ColumnFixture - cannot be resolved

    wow, thankyou for the super fast replies. I will go have a dig around to find out how to add the jar file to the class path and will post back when I find out.

    thanks again.

  5. #5
    rich197803 is offline Member
    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Default Re: Import fit.ColumnFixture - cannot be resolved

    HA HA. Found it here:

    Adding and Removing JAR files in DrJava

    and that worked a treat. Amazing how you go from utter frustration from your own inability to complete the simplest task to joy when it works.

    Now for the age old question. Do I leave it alone for now, on a successful note, or do I carry on to quickly find my next issue...:-)

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default Re: Import fit.ColumnFixture - cannot be resolved

    Quote Originally Posted by rich197803 View Post
    Now for the age old question. Do I leave it alone for now, on a successful note, or do I carry on to quickly find my next issue...:-)
    Don't push your luck; it's Thursday afternoon overhere now so it's Grolsh time; to hell with all that Java crapola ;-)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. the import x cannot be resolved
    By Hazza in forum New To Java
    Replies: 1
    Last Post: 11-12-2012, 11:44 AM
  2. The import java.security cannot be resolved??
    By Harrie_KalaChakra in forum Eclipse
    Replies: 9
    Last Post: 01-20-2010, 05:15 AM
  3. Error - "The import org.junit cannot be resolved"
    By Jessaurum in forum New To Java
    Replies: 7
    Last Post: 11-03-2009, 03:20 AM
  4. Eclipse "import not resolved" package problem?
    By spamsickle in forum New To Java
    Replies: 3
    Last Post: 08-24-2009, 11:44 AM
  5. The import java.util.Scanner cannot be resolved
    By Heather in forum Advanced Java
    Replies: 1
    Last Post: 07-08-2007, 01:05 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
  •