Javax packages

The "javax." hierarchy is included with the SDK. As a result, I was wondering: why did Sun choose to create a separate root package for the classes in that heirarchy? I know that the "sun." packages are essentially Sun's playground and that Sun has a disclaimer indicating that we should not use it. So what is the purpose of the "javax." packages?

I found this explanation at http://mindprod.com/jgloss/javax.html:
The extensions to standard java belong in the javax.* packages. They are not included in the JDK or JRE. You must download them separately. They include things like: Servlets and Enterprise JavaBeans, JAF, JavaMail and Swing.
This is obviously not true in 2009, so I assume it's just an historical thing. When Sun decided to include them in the JRE/JDK, it was too late to change the package name, as this would break a lot of existing code.

Similar Messages

  • Java 1.4.2_02 javax package

    Hello,
    I downloaded and installed:
    java version "1.4.2_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)
    But when I try to import javax the compiler cannot find it. It can find normal java packages but not javax. Any ideas?

    javax packages are language extensions.
    Which ones are you looking for?
    For example, if you need javax.servlet, it's not part of the JDK download. You'll need to download and install Tomcat or another servlet/JSP engine that has the servlet.jar.
    Java3D comes in a javax package. That's separate download, too.
    MOD

  • Org and javax packages

    hello,
    where should I look for documentation on org and javax packages?
    I mean, if I see a function from the java package, I can google it and find out which are it's constructors, methods, what it implements or extends etc.
    But if I see for instance import org.jdesktop.application.ResourceMap where can I find out anything about this one? Just try to google it, nothing useful comes up. Or try FrameView, which is quite important- the same problem.
    Are this packages documented somewhere, like java package is?

    Javax packages are standard Java eXtensions (y'see?) and the docs tend to be in the standard Sun documentation. As for "org", you need to look a bit further. For instance if you're talking about packages starting with org.apache, that points you to apache.org. So for org.jdesktop, guess where you go? It's the recommended way to name your packages, from your domain name that way.

  • Where to find javax package??

    I got a javax package which holds only servlet package and now i need ejb which not there in my package..Please tell me where the javax whole package ????

    You can find the complete set of classes bundled with one of the jars provided by your Application Server. It's weblogic.jar in case you're having Weblogic App Server, jboss-j2ee.jar if you have JBoss on your box as the App Server and so on.
    cheers,
    fun_one

  • "javax" packages do not exist.

    Hello,
    I am learning to write servlet using J2EE 5SDK. But for some reason, the compiler (javac) keeps telling me that the following packages do not exist:
    javax.servlet
    javax.servelet.http
    Without the "javax" packages, the codes get compiled. I did everything in the instruction on how to set the PATH variable. It did not work. So I took the extra steps and set the PATH variable to all the bin and lib directories:
    c\Sun\AppServer\bin;
    c:\Sun\AppServer\jdk\bin;
    c:\Sun\AppServer\jdk\jre\bin;
    c:\Sun\AppServer\jdk\jre\bin\client;
    c:\Sun\AppServer\jdk\jre\bin\server;
    c:\Sun\AppServer\lib;c:\Sun\AppServer\jdk\lib;
    c:\Sun\AppServer\jdk\jre\lib;
    After all that, it still didn't work. Did I miss any entry? Where are the javax packages locate? Your help are much appreciated. Thanks :)

    Look here.

  • Where to get javax package?

    HI,
    Can any one tell me from where i can get javax package ?
    I want
    javax.resource.spi.*
    javax.resource.
    packages..
    i went to java.sun.com but was not able to find it.
    thanks
    Fariha

    Hi Fariha,
    Check this package on SUN.com:
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/resource/spi/package-summary.html
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/resource/package-summary.html
    Rewards if helpful. *
    Regards,
    Subhasha

  • Finding javax package with javac

    Hi
    I have just installed j2sdk1.4.0_03 and Tomcat 4.1, using it as a JSP/servlet loocalhost. The installation wooks fine but when I try to compile with javac, the javax package can�t be found.
    This is the change I have made to autoexec.bat �
    set PATH=%PATH%;C:\j2sdk1.4.0_03\bin
    set CLASSPATH=.;C:\j2sdk1.4.0_03\src.zip
    Obviously the javax package is not included in src.zip but when I use, for example page import javax.servlet.* in a jsp-file that is compiled by Tomcat, it is found.
    So, how do I get javac to find the javax package?
    Thanks in advance / regards pg

    to run servlets you need to add the servlet.jar in your classpath. servlet.jar comes with most servlet runners like tomcat.

  • How to set JDeveloper to find javax packages

    I need to import javax.naming and javax.packages in my code. These are available in j2ee.jar (provided by sun). I placed this jar in JDeveloper/lib directory and added this library to my default project properties. But I receive an error message saying that the classes are not found.
    How do we use Sun's packages in JDeveloper
    Thanks in advance
    Mita

    In general, this should work. You say, though, that you added the libraries to the Default Project Properties? The default project properties are only used when you create a new project. Make sure that the libraries are accessible to your current project as well.
    -- Brian

  • Having problem with javax packages

    i had problem with compiling my program which is java servlet, and it is complaining that it does exist javax servlet * package , how can i solve this problem?

    I don't think servlets come with the standard packages. You have to find it somewhere else. I think you can try J2EE API. There in beta version for 1.3. Should be ok though. Hopefully it will fit right into 1.4.

  • Javax packages not found for J2SDK 1.5.0

    Hi,
    I am very new to Java SDK. I just installed J2SDK 1.5.0 beta 2 and installed it on my RedHat 9.0 box with root permission at /usr/local/(java-home)/
    I can compile simple applications which do not import extension packages. However, when I try to compile an application importing javax.swing.* , I get the below error message:
    Craps.java:9: Can't find default package `javax.swing'. Check the CLASSPATH environment variable and the access to the archives
    Craps.java:11: Superclass `JApplet' of class `Craps' not found.
    public class Craps extends JApplet implements ActionListener {
    The code of this application is correct, coz I can compile and execute it in Windows.
    Can anybody help me with this problem?
    Thanks!

    Hi Joni,
    Thank you for the reply!
    I've solved the problem with your inspiration of the ClASSPATH. This is for the reference of those who may encounter the same problem as me.
    I installed Redhat 9.0 with default settings and those bundled packages (could be normal to many Linux newbies like me :) There is a default java compiler installed, I guess, and it's bundled with gcc. So when I tried to compile my .java files, the javac comand from j2sdk was not involked. Instead, it's the default-installed java compiler that correspended to my command. I guess this is why no matter what I changed in the .bash_profile in my home directory, the j2sdk command javac had not executed.
    After I uninstalled this one, and add j2sdk/bin into my CLASSPATH, everything works fine now.
    Btw, I found out this problem by simply typing "javac" in the terminal and read the help suggestions that followed.

  • Help: Forte on Windows, cant find javax packages

    Forte integration was working fine for me yesterday, and after uninstalling and re-installing (to fix another problem), I now get the following error:
    Test/TestApp.java [9:1] package javax.microedition.midlet does not exist
    import javax.microedition.midlet.*;
    ^
    Any ideas what went wrong? Where does Forte look for the classpath? I have a CLASSPATH environment variable set, is it using this, or is there an app-specific configuration it looks for? Forte 3, JDK 1.3.1, J2MEWTK 1.0.3.
    Thx,
    Fred

    [HypnosFred],
    Did you re-install the J2ME Wireless Toolkit 1.0.3 BETA as well after your re-installation of Forte for Java 3.0?
    This is because the installation process of the J2ME Wireless Toolkit 1.0.3 BETA software will prompt the user if he/she wants to integrate to Forte for Java or not. If you choose to integrate the J2ME WTK to Forte for Java, it will place classpath settings, etc, etc, etc on the configuration files of Forte for Java 3.0.
    Let us know if you still have problems and get the error messages.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Javax package not found

    Hi,
    I installed jdk1.4 in my system.And i type one swing concept program.After compilation of that program.It shows error like Javax.Swing. package not found.Please help to me to clear the proble.And also Javax.servlet package also not taken.
    regards
    sridhar

    Its javax, not Javax.

  • Import javax packages

    i have installed JMF yet my programs show an error saying " cant import javax.comm" and cant import "javax.media.*". i would like to know how and where should packages be extracted so that the java program can access them.
    thanx in advance.
    regards.

    javax.comm is a pain in the rear to install - the instructions haven't been updated since 1997, and windows 2k etc works differently from nt/95! You have to put all the files they mention in the appropriate places (they specify) in c:\program files\java\ etc rather than in c:\j2sdk1.4.1\... by the time I had finally figured this out (I'm not the fastest on the draw!) the damn files were everywhere on my hard-drive! Maybe something similar for media? Hope this helps, have a nice day :)

  • "javadoc not found" error for javax package in netbeans.

    I am using jmf api on windows under netbeans. But problem is that netbeans do not display documentation for jmf methods . Instead it shows "javadoc not found"
    error. Can someone plz help me how to configure the javadoc for jmf.

    I am using jmf api on windows under netbeans. But problem is that netbeans do not display documentation for jmf methods . Instead it shows "javadoc not found"
    error. Can someone plz help me how to configure the javadoc for jmf.Download api docs from [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/specdownload.html] ....
    Then in NetBeans:
    Tools > Java Platforms > "JDK 1.x (Default)" > "Javadoc" tab > "Add zip/folder" button.....
    Add the path of the jmf javadoc zip (or you may have to extract the zip)
    You may not see the changes immediately, try restarting NetBeans....
    Thanks!

  • Package javax.servlet does not exist - settings appear to be correct

    laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be...
    Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty Hall and Larry Brown I get hung up on the packages. This time, I downloaded and followed step by step what the website said to do...it was even preconfigured for me! Alas...I am getting the following compliation errors on a "simple packagless" program with NetBeans:
    Compiling 1 source file to C:\Servlets+JSP\HelloServlet\build\classes
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
    symbol: class HttpServlet
    public class HelloServlet extends HttpServlet {
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    6 errors
    BUILD FAILED (total time: 0 seconds)
    These are my environment settings (note that the JAVAX package is located under the src folder in Java)
    Catalina Home:
    C:\apache-tomcat-6.0.10
    CLASSPATH:
    C:\apache-tomcat-6.0.10\lib\servlet-api.jar;
    C:\apache-tomcat-6.0.10\lib\jsp-api.jar;
    C:\apache-tomcat-6.0.10\lib\el-api.jar;
    C:\Servlets+JSP;..;..\..;
    C:\Program Files\Java\jdk1.6.0_03\src
    JAVA_HOME
    C:\Program Files\Java\jdk1.6.0_03
    Path:
    C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
    Any ideas (excluding the one that maybe I should let my hair grow out, put on some tackey shorts and sandles and start palying an instrument in the streets of Austin for living?)

    cabkats wrote:
    You are then suggesting that I make the corrections directly to the files in apache using notepad instead of using the envir. variables?No I am not suggesting that. I am suggesting that you need to read the documentation about the product(s) and set them up the way they require, rather than blindly think that the CLASSPATH environment variable is some magical entity.
    I will try this, but I was hoping that since my IDE auto configured (with exception to java_home) that I would not have to do this. I wil give it try....thanks for the suggestion.See, you're using an IDE. Like I mentioned, IDEs do not use the CLASSPATH environment variable. You need to set up your project in your IDE in such a way that it knows what the dependent jars are. I'm sure there's a way to add jars to your project's dependencies.

Maybe you are looking for