473,668 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\ser vlet.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%\bi n). 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.ja va

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

public ChildrenBook(St ring title)
{
super(title);
}
}

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

my directory structure is this

c:\tomcat\webap ps\hello\WEB-INF\classes\lib rary

the files are placed in the library folder.

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

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

thx for the help.
Jul 17 '05 #1
1 6831
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\ser vlet.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%\bi n). 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.ja va

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

public ChildrenBook(St ring title)
{
super(title);
}
}

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

my directory structure is this

c:\tomcat\webap ps\hello\WEB-INF\classes\lib rary

the files are placed in the library folder.

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

library\Childre nBook.java:2: cannot resolve symbol
symbol : class Book
location: class library.Childre nBook
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
2906
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 SCRIPT_NAME. The code below works perfectly when I upload it to my webhost server. However, at home, everything processes corectly except the environmental variables are blank.
0
1435
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 Win 2K machine. I would like for the Ant to pick up CLASSPATH from my servlet's JVM; because in a true server environment I'd not know the complete path (starting at c:\) to the directory where my jars exist.
1
10242
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 a simple service for testing purposes (1 string IN, 1 string OUT) and I've found where the exception occures but not why. But I've exhausted my own attempts. I've researched the web for Axis issues and here is a brief description of the...
15
1611
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 i get the information of all the variables, with the variable names and its values Pls Help
4
6427
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 thinking the following might help. I would appreciate if someone could comment on this idea and possibly suggest a better one: The environement variable in question is 'Path' in the HKCU registry folder's Environment key. I want to add some...
9
10815
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
2628
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. For some users the application shows an error dialog with following information. Another very interesting observation is that it's sending a lot of requests to the servlet within no time. Please note that this is not happening for all users.
0
1118
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 are expected as hidden variables on the form(of 2.aspx). The workflow is simple, the user selects diff values for drop downs and then hits Run(which calls some javascript code), which would populate hidden variables on 2.aspx, and then submit...
4
13986
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 provided with 'AXIS'. Later ,I wanted to run a 'build.xml' file created of my own to run the 'example3' project under a diffrent directory and configured the 'build.xml' accordingly. I succeded but after then .. I could not run any of the...
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8382
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.