Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 19th, 2003, 11:20 AM
Registered User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to granola911 Send a message via Yahoo to granola911
Default Help on Packages

I am working the "Try it" in chap 7 of this book. I created a book class which is stored in classes\com\wrox\library.

when I try to create subclasses, ChildrenBook and TechnicalBook I include: package com.wrox.library;

but I get this error message when I compile:

C:\Apache\Tomcat 4.1\webapps\begjsp-ch07\WEB-INF\classes\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

Tool completed with exit code 1

Thanks for any help

Old September 28th, 2003, 11:28 PM
Authorized User
Join Date: Aug 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

The problem is with your classpath that you include with the command to compile ChildrenBook.java. From your library folder, execute the javac command like this "javac -classpath C:\Apache\Tomcat~1\webapps\begjsp~1\WEB-INF\classes\com\wrox ChildrenBook.java". By using everything between the quotes, you're telling the compiler that the package 'library' (which contains the class Book.class) to start in the 'wrox' folder, then from there look for the 'library' package as it says to in the ChildrenBook class. By including the classpath parm, you're giving it the beginning location on where to find Book.class. Without specifying the starting point, it won't know to begin looking for 'library'....good luck!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with packages bonnevillessei BOOK: Beginning Java 2 2 October 1st, 2009 07:50 AM
Packages Xmlelement octave XML 2 April 24th, 2008 03:13 AM
remote packages naveen Servlets 4 October 9th, 2004 09:03 AM
Packages application in C# lam_lvl VS.NET 2002/2003 1 November 1st, 2003 11:25 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.