473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

environmental variables, classpath setup and servlet.jar

Ric
thx for the help. im having problems with java and jsp. i think im not
settup up the enviornmental variables right in w2k advanced tab. im
using a wrox book, but the wrox book references a servlet in the
classpath environmental variable:

CLASSPATH
%CATALINA_HOME%\common\lib\servlet.jar

i dont see a servlet.jar file in that directory. i do see a
servlet-api.jar file. are they right?

i have a path set up for JAVA_HOME (c:\java) and path variable is set
up (%JAVA_HOME%\bin). i think those are working because i can compile
java files into class files. but i cant compile a sub class that
extends to a super class.

here is the code im using:

Book.java
+++++++++++++++++++++++++
package library;
public class Book
{
private String title;
public String getTitle()
{
return title;
}

public Book(String title)
{
this.title = title;
}
}

++++++++++++++++
ChildrenBook.java

package library;
public class ChildrenBook extends Book
{
private String age;
public String getAge()
{
return age;
}

public ChildrenBook(String title)
{
super(title);
}
}

++++++++++++++++++

my directory structure is this

c:\tomcat\webapps\hello\WEB-INF\classes\library

the files are placed in the library folder.

here is the error i get when i try to compile the ChildrenBook.java
file

library\ChildrenBook.java:2: cannot resolve symbol
symbol : class Book
location: class library.ChildrenBook
public class ChildrenBook extends Book
^

thx for the help.
Jul 17 '05 #1
1 6807
Ric wrote:
thx for the help. im having problems with java and jsp. i think im not
settup up the enviornmental variables right in w2k advanced tab. im
using a wrox book, but the wrox book references a servlet in the
classpath environmental variable:

CLASSPATH
%CATALINA_HOME%\common\lib\servlet.jar

i dont see a servlet.jar file in that directory. i do see a
servlet-api.jar file. are they right?

i have a path set up for JAVA_HOME (c:\java) and path variable is set
up (%JAVA_HOME%\bin). i think those are working because i can compile
java files into class files. but i cant compile a sub class that
extends to a super class.

here is the code im using:

Book.java
+++++++++++++++++++++++++
package library;
public class Book
{
private String title;
public String getTitle()
{
return title;
}

public Book(String title)
{
this.title = title;
}
}

++++++++++++++++
ChildrenBook.java

package library;
public class ChildrenBook extends Book
{
private String age;
public String getAge()
{
return age;
}

public ChildrenBook(String title)
{
super(title);
}
}

++++++++++++++++++

my directory structure is this

c:\tomcat\webapps\hello\WEB-INF\classes\library

the files are placed in the library folder.

here is the error i get when i try to compile the ChildrenBook.java
file

library\ChildrenBook.java:2: cannot resolve symbol
symbol : class Book
location: class library.ChildrenBook
public class ChildrenBook extends Book
^

thx for the help.


This is not an unusual problem, it is caused by the package directive.
When classfiles are created, they must be placed in a directory hierarchy
that reflects their package names. Make sure that all components in your
package name hierarchy is a legitimate directory for your OS platform.
So for your case, see if the \library directory exists ?
Brgds,
Herman
--
Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bruce Lehmann | last post by:
Hi, I've installed Apache (WAMP install) so I can edit and test my web site on my home computer. In general php code seems to work, but I can't access Apache variables such as PATH or...
0
by: Sri | last post by:
Hi, I'm having trouble specifying the classpath (to Ant) when I'm running Ant from within a servlet. Whatever directory I try to specify, Ant is trying to build the path starting at c:\ on my...
1
by: Dave Keays | last post by:
I am setting-up an experimental web service using Apache Axis but I'm having problems. AXIS can't find a library that I've verified exists on my computer and that CLASSPATH points to it. I'm using...
15
by: Casanova | last post by:
Hello!! how can i get all the details of the environmental variables. If i use getenv, i will have to specify the name of the variable. for intsance i will have to give getenv("PATH") How can...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
9
by: Sathyaish | last post by:
In which physical file are the python environmental variables located? I know I can access them using the: os.environ.get('PYTHONSTARTUP') or os.environ.get('PYTHONPATH')
5
by: Vijaya P Krishna | last post by:
Hi, I have a .NET Windows Forms application, written in VB.NET and C#. I am opening a URL from the application using Process.Start(). The URL points to a java servlet running on apache-tomcat....
0
by: Ben | last post by:
Hi All, I have a web app which uses Frames, frame 1 with search criteria(1.aspx) and frame 2 with results(2.aspx). Frame2 in turn posts to a servlet(action="servlet URL") and the report parameters...
4
by: nawrin22 | last post by:
hi.. I am a niwebie in 'AXIS' . but i had correctly installed it without any problem with the help of 'apache.axis.install.pdf' and also tested the examples under 'samples\userguide' directoy...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.