We help IT Professionals succeed at work.

Where I can find javax library in Java

duncanb7 asked
Dear Expert,

When one open source file which requires Java servlet and the coding as follows.
javac report error showns aslo as follows. But it doesn't report the import error from
"import javax.swing.*. So I try to download the servlet from Java Sun at
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/DownloadSingleSoftware-Start?OrderID=louJ_hCy53gAAAEpQqNu7APQ&ProductRef=jdk-6u20-oth-JPR_Multi-language_with_Windows%40CDS-CDS_Developer. Those is only source code.  And I check my  installed Java
directory at ...\java\bin\ there is no any javax thing.

Question-1: Where the file javax file located in java directory  so that I could set a path ?
Question-2: Where I can download Java Servlet ?
question-3, Why import javax.swing.* passed but javax.servlet.*** doesn't pass

Please advise it kindly

D:\wkw\Summary\internet-language\chart-Graph\javademo\ChartDirector>javac -c
BaseChart.java:9: package javax.servlet does not exist
/*      */ import javax.servlet.ServletContext;
BaseChart.java:10: package javax.servlet does not exist
/*      */ import javax.servlet.ServletRequest;
BaseChart.java:11: package javax.servlet.http does not exist
/*      */ import javax.servlet.http.HttpServletRequest;
BaseChart.java:12: package javax.servlet.http does not exist
/*      */ import javax.servlet.http.HttpSession;
/*      */ import java.awt.Image;
/*      */ import java.io.File;
/*      */ import java.net.URL;
/*      */ import java.util.Collections;
/*      */ import java.util.Date;
/*      */ import java.util.Vector;
/*      */ import javax.swing.*;
/*      */ import javax.servlet.ServletContext;
/*      */ import javax.servlet.ServletRequest;
/*      */ import javax.servlet.http.HttpServletRequest;
/*      */ import javax.servlet.http.HttpSession;
/*      * import javax.servlet.jsp.PageContext;

Open in new window

Watch Question

you can find at :

1) if tomcat installed:
\Tomcat 5.5\common\lib\servlet-api.jar

2) http://mirrors.ibiblio.org/pub/mirrors/maven2/milyn/j2ee/1.4/j2ee-1.4.jar


It is passed, thanks