Solved

JAVAX Installation

Posted on 2004-10-05
7
715 Views
Last Modified: 2013-11-24
I have a 'file javax\servlet\Servlet.class" problem, and several more similar javax 'not found' errors.  From reviewing other calls and my system it appears clear that I need to download and install the javax package.

I downloaded the javax package, and installed in a temporary directory for viewing.  The structure is...

servlet.jar
---api
------javax
---------servlet
------------class-use
------------http
---------------class-use
---src
------javax
---------servlet
------------http

I have several questions about installation of the javax package, and also want a little education.

My basic question is how to install the javax package...

Is it true that all I have to do is copy the servlet.jar to a directory, (say jre/lib/ext), and ensure that that directory is in the classpath?  (I.e., include 'c:jre/lib/ext/servlet.jar' in classpath)

My secondary question is what are the other directories included in the javax package for?  Are they redundant?  In other words, is the downloaded package giving me a choice of using the servlet.jar, or using the same functionality contained in the exploded directory structure?
0
Comment
Question by:LarryAndro
  • 4
  • 2
7 Comments
 
LVL 14

Assisted Solution

by:sudhakar_koundinya
sudhakar_koundinya earned 20 total points
ID: 12227623
javax is the base package for extended Java API.

The extended API could be anything. One of them is Servlets API which is jarred as servlet.jar;

for setting the classpath

set classpath=%classpath%;c:\jre\lib\ext\servlet.jar;
0
 
LVL 12

Accepted Solution

by:
Giant2 earned 230 total points
ID: 12227762
>My basic question is how to install the javax package...
>Is it true that all I have to do is copy the servlet.jar to a directory, (say jre/lib/ext), and ensure that that directory is in the classpath?  (I.e., include 'c:jre/lib/ext/servlet.jar' in classpath)

Yes, but if you use a AppServer this package must be reached by the AppServer application.

>My secondary question is what are the other directories included in the javax package for?  Are they redundant?  In other words, is the downloaded package giving me a choice of using the servlet.jar, or using the same functionality contained in the exploded directory structure?

the servlet.jar contain classes about servlet. I see a directory src in your post. src is not extremely needed. It contains the source (src stands for source normally).

Hope this clarify your doubts.
Bye, Giant.
0
 
LVL 1

Author Comment

by:LarryAndro
ID: 12227913
OK.  Will copy servlet.jar and also add it to classpath, etc, etc.

Giant2 said... 'Yes, but if you use a AppServer this package must be reached by the AppServer application.'  I am using Tomcat.  Is this what you mean by AppServer?  Are there Tomcat issues I should be aware of?

My development environment is Eclipse.  After installing javax, I will add it to the libraries in the Java Build Path.  Sound OK?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 12

Expert Comment

by:Giant2
ID: 12227947
>I am using Tomcat.  Is this what you mean by AppServer?
Yes.

>My development environment is Eclipse.  After installing javax, I will add it to the libraries in the Java Build Path.  Sound OK?
Yes, in the library of the project you are developping.
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12228026
Normally Tomcat has a servlet-api.jar in the common lib library it's own.
0
 
LVL 1

Author Comment

by:LarryAndro
ID: 12228332
Thanks, everyone...  Splitting points now...
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12234742
:)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now