Have u put Book.class in a directory called com/worx/library?
To do this, use javac Book.java -d .

----- Original Message -----
From: "Philip Steel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 4:05 PM
Subject: Compilation error - "cannot resolve symbol"


> Hi there
>
> I have made a package called com.wrox.library and compiled the following
> class successfully:
>
> package com.wrox.library;
>
> public class Book {
>
>   private String title;
>
>   public String getTitle() {
>     return title;
>   }
>
>   public void setTitle(String title) {
>     this.title = title;
>   }
>
>   public Book() {
>   }
>
>   public Book(String title) {
>     this.title = title;
>   }
>
> }
>
>
> When I try and compile the following class (part of the same package)
which
> inherits Book, I get the following error:
> com\wrox\library\ChildrenBook.java:3: cannot resolve symbol
> symbol : class Book
> location: class com.wrox.library.ChildrenBook
> public class ChildrenBook extends Book {
>                                                    ^
> 1 error
>
> Here's the code:
>
> package com.wrox.library;
>
> public class ChildrenBook extends Book {
>
>   private int minimumAge;
>
>   public int getMinimumAge() {
>     return minimumAge;
>   }
>
>   public void setMinimumAge(int a) {
>     minimumAge = a;
>   }
>
>   public String getType() {
>     return "CHILDREN";
>   }
>
>   public ChildrenBook() {
>     super();
>   }
>
>   public ChildrenBook(String title) {
>     super(title);
>   }
> }
>
>
>
> Phil Steel
> Tequila Digital
> 82 Charing Cross Road
> LONDON WC2H 0QB
> 020 7557 6228
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to