Solved

JAVAX Installation

Posted on 2004-10-05
7
730 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

728 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