SET CLASSPATH

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Abdelhalim MIMOUNI

    #1

    SET CLASSPATH

    hi, i'm using the abstract class definition, and when compiling the abstract
    class it's ok, but the problem is when compiling the subclass: i get the
    following message:

    Rect.java:9: cannot resolve symbol
    symbol : class GeoFigure
    location: class figures.Rect
    public class Rect extends GeoFigure
    ^
    1 error

    the abstract class is called: GeoFigure;
    and the subclass is Rect

    so how cn use the set classpath at command line, should it include the
    directory where are located all the package files(the abstract class and
    subclass .java files), or should it point at onel evel before the directory
    that contains the package files?
    thank's!

    --
    SAID BARA


  • Raymond DeCampo

    #2
    Re: SET CLASSPATH

    Abdelhalim MIMOUNI wrote:[color=blue]
    > hi, i'm using the abstract class definition, and when compiling the abstract
    > class it's ok, but the problem is when compiling the subclass: i get the
    > following message:
    >
    > Rect.java:9: cannot resolve symbol
    > symbol : class GeoFigure
    > location: class figures.Rect
    > public class Rect extends GeoFigure
    > ^
    > 1 error
    >
    > the abstract class is called: GeoFigure;
    > and the subclass is Rect
    >
    > so how cn use the set classpath at command line, should it include the
    > directory where are located all the package files(the abstract class and
    > subclass .java files), or should it point at onel evel before the directory
    > that contains the package files?
    > thank's!
    >[/color]

    Suppose you have the class com.foo.Bar. The file Bar.class lives in the
    /home/xyzzy/classes/com/foo directory. Set your classpath to include
    the /home/xyzzy/classes directory.

    HTH,
    Ray

    --
    XML is the programmer's duct tape.

    Comment

    • Abdelhalim MIMOUNI

      #3
      Re: SET CLASSPATH

      thank's, nut know that i'm alwas gettin the same error message, know that
      i'm trying to use the classpath instruction in console mode, as i'm using
      SUN JDK, i compile and run my programs using this method!
      so, i want to give the path to the compiler after compiling the main
      class(abstract class) when compilng the subcalss that extends the abstract
      one, but in console mode, i don't want to inclde it in the environnement
      var!
      i'm trying o use this difinition:
      SET CLASPATH=.;[driveletter]\[Directoy1]\[Directoy2]\[Directoy]\[Directoy4]
      and know that the Directoy5 conatins the abstract class defifniton(.jav a
      file), and sure they have to be all iln the same directiory (directiory5)
      thank's!
      --
      AbdelHalim MIMOUNI
      "Raymond DeCampo" <nospam@twcny.r r.com> a écrit dans le message de
      news:s7qse.2115 1$fp6.2777@twis ter.nyroc.rr.co m...[color=blue]
      > Abdelhalim MIMOUNI wrote:[color=green]
      > > hi, i'm using the abstract class definition, and when compiling the[/color][/color]
      abstract[color=blue][color=green]
      > > class it's ok, but the problem is when compiling the subclass: i get[/color][/color]
      the[color=blue][color=green]
      > > following message:
      > >
      > > Rect.java:9: cannot resolve symbol
      > > symbol : class GeoFigure
      > > location: class figures.Rect
      > > public class Rect extends GeoFigure
      > > ^
      > > 1 error
      > >
      > > the abstract class is called: GeoFigure;
      > > and the subclass is Rect
      > >
      > > so how cn use the set classpath at command line, should it include the
      > > directory where are located all the package files(the abstract class and
      > > subclass .java files), or should it point at onel evel before the[/color][/color]
      directory[color=blue][color=green]
      > > that contains the package files?
      > > thank's!
      > >[/color]
      >
      > Suppose you have the class com.foo.Bar. The file Bar.class lives in the
      > /home/xyzzy/classes/com/foo directory. Set your classpath to include
      > the /home/xyzzy/classes directory.
      >
      > HTH,
      > Ray
      >
      > --
      > XML is the programmer's duct tape.[/color]


      Comment

      Working...