Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2003, 03:05 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default classpath problem

hi to all, i have started with "beginning JSP web development" and got stuck on chapter 7 about classes. when i try to compile a code i get "cannot resolve symbol"

i followed the instruction on the book on how to install java & tomcat. I also followed the instruction on how to set the environmental variable including the CLASSPATH. I'm using windows 2000 NT. I currently have the classpath set as (under system variable):

        CLASSPATH c:\jakarta-tomcat-4.0\common\lib\servlet.jar;.

I have the files: Book.java, Book.class, TechnicalBook.java & ChildrenBook.java under the following directory:

c:\jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB- INF\classes\com\wrox\library

I'm trying to compile TechicalBook and ChildrenBook and in the code it extends Book. Any help will be appreciated. Thanks.


Reply With Quote
  #2 (permalink)  
Old July 18th, 2003, 11:09 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi amcp2002,
Have you had any luck with this? I am having the same problem!
Reply With Quote
  #3 (permalink)  
Old July 19th, 2003, 12:41 AM
Authorized User
 
Join Date: May 2003
Location: New Delhi, Delhi, India.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
I suggest u kindly provide the details of error you r getting after that only i will be able to help u out.

Regards


Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team
Reply With Quote
  #4 (permalink)  
Old July 21st, 2003, 06:58 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Yashraj Chauhan
 Hi
I suggest u kindly provide the details of error you r getting after that only i will be able to help u out.
Thanks Yashraj. Here are the details:

When I try to compile the ChildrenBook.java file
 
Quote:
quote: . . . \objects\WEB-INF\classes>javac booklibrary\ChildrenBook.java
Quote:
I get the following error:
 
Quote:
quote: booklibrary\ChildrenBook.java:28: cannot resolve symbol
Quote:
symbol : constructor Book (java.lang.String)
location: class booklibrary.Book
    super(title);
    ^

1 error
* I have compiled the Book.java class successfully.
Reply With Quote
  #5 (permalink)  
Old July 21st, 2003, 03:04 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's the same exact mesage I was getting. The cursor or error is pointing on the second "B" of
"public class TechnicalBook extends Book {" of the TechnicalBook.java & ChildrenBook.java

Reply With Quote
  #6 (permalink)  
Old July 23rd, 2003, 01:11 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

i finally get it to work after researching on the internet. I had to do the following on the c: prompt.

  cd jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB-INF\classes <enter>

  and then

  javac com\wrox\library\TechnicalBook.java <enter>

  &

  javac com\wrox\library\ChildrenBook.java <enter>

I realized that this is what was exactly on the book.





Reply With Quote
  #7 (permalink)  
Old July 24th, 2003, 02:29 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is what I have been doing all along - and I still get the same error message.

Reply With Quote
  #8 (permalink)  
Old July 24th, 2003, 07:27 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

pedersen, tell me where your files are located (Book.java, Book.class, TechnicalBook.java, ChildrenBook.java, bookPage1.jsp).
Type the codes too.

Also, what do you have on the CLASSPATH variable?

Reply With Quote
  #9 (permalink)  
Old July 24th, 2003, 09:31 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

acmp,
all java files are in c:\Program files\Apache Software Foundation\Tomcat 5.0\webapps\objects\WEB-INF\classes\booklibrary (haven't got to the jsp page yet).

CLASSPATH variable is .;C:\Program Files\SQLLIB\java\db2java.zip;C:\Program Files\SQLLIB\java\runtime.zip;C:\Program Files\SQLLIB\java\sqlj.zip;C:\Program Files\SQLLIB\bin;%CATALINA_HOME%\common\lib\servle t-api.jar; - is this relevant? as the book said nothing about setting the java tools in the class path, only in the PATH?

Cheers,
Ped

Reply With Quote
  #10 (permalink)  
Old July 25th, 2003, 02:21 AM
Authorized User
 
Join Date: May 2003
Location: New Delhi, Delhi, India.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
To compile ChildrenBook.java and TechnicalBook.java you have to set the following classpath.

javac -classpath "c:\jakarta-tomcat-4.0\webapps\begjsp-ch07\WEB-INF\classes" ChildrenBook.java

same for the TechnicalBook.java

Hope this helps



Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exec:java classpath problem mslinn BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 2 December 1st, 2008 08:05 AM
problem in setting the classpath. Sibananda Tripathy J2EE 1 May 2nd, 2007 01:08 AM
classpath ekta BOOK: Beginning Java 2 1 March 28th, 2005 11:35 PM
classpath? abdi Java GUI 1 December 8th, 2004 04:44 PM
ClassNotFoundException - CLASSPATH problem? pmckeever JSP Basics 0 December 4th, 2003 10:02 AM



All times are GMT -4. The time now is 11:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.