Solved

JAVAX Installation

Posted on 2004-10-05
7
718 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 81
Groovy:unable to resolve class error 2 70
eclipse java  build path 6 45
Weekend adv creator 3 14
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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 about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

863 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

20 Experts available now in Live!

Get 1:1 Help Now