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 :)

Similar Messages

  • Import javax.servlet.* package not found

    hai i am pradeep i am using java 1.5 and tomcat 5.5 version when i just include import javax.servlet.* in simple hellow word program and compile it shows error
    import javax.servlet.* package not found
    i set my class path to as
    E:\set path="D:\Program Files\Java\jdk1.5.0_04\bin" and compile this it pops a message please help me i am using winxp os
    by
    pradeep sreedharan

    you are not setting the classpath but the path, and they should both be written in capitals, PATH and CLASSPATH.
    The classpath contains directories and jar files that contain the classes that need to be "visible" to your applications. The servlet classes are part of the file servlet-api.jar, which you can find in your tomcat directory, more specifically the common/lib sub directory.
    I would expect your classpath to look something like this:
    .;d:\program files\tomcat\common\lib\servlet-api.jar
    You may also want to add the directory in which you are storing your projects, I don't know how you are building your applications.
    You seem to be very new to this, so I would suggest you give this a read:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

  • Import javax.mail package does not exists

    Hi,
    when i tried to compile the source code for email using jdk1.3.1, it compiled fine. but when i tried to compile using jdk1.4.., it had the following errors such as
    import javax.mail package does not exists,
    import javax.mail.internet package does not exists
    package javax.activation does not exist
    Is it because of the jdk version problem???
    Pls help me

    I have the same problem with javax.ejb
    Now i've downloaded and installed the j2ee and set my classpath to the j2ee.jar. I've had to make a new path cause i'm running XP.
    This doesn't work.
    to compile it in Jcreator or JBuilder I can make it work by adding this package (j2ee.jar) in the project settings - required libraries.
    But I have to do this for every project again and again.
    I can make it work but i thougt the classpath would be enough ??
    Bassegio

  • Import javax.servlet.* gives error "package does not exist"

    I am working through Monica Pawlan's book "Essentials of Java PL".
    My PC runs Windows2000 prof. I have downloaded and installed j2sdk-1_3_1_01-win.exe in c:\jdk1.3.1_01
    I have downloaded and installed tomcat4.0 (jakarta-tomcat-4.0.zip) into c:\jakarta-tomcat-4.0
    CATALINA_HOME is set to c:\jakarta-tomcat-4.0 and CLASSPATH is set to .;C:\jakarta-tomcat-4.0\common\lib\servlet.jar
    I can compile an applet starting:
    import java.awt.Color;
    import java.awt.BorderLayout;
    import java.awt.event.*;
    import javax.swing.*;
    //Class Declaration
    class SwingUI extends JFrame implements ActionListener { ... }
    but trying to compile my servlet starting:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ExampServlet extends HttpServlet { ... }
    gives me the error (import javax.servlet.*) "package does not exist".
    Any pointers on this immediate problem? and is my book out of date?
    Many thanks,
    James Towell

    You downloaded the Java 2 SDK Standard Edition, but you need to also download the Enterprise Edition if you want to write programs that use enterprise features.

  • Could not import javax.ejb.* package

    On compiling my EJB program the following errors appears
    C:\bea\wlserver6.0sp1\samples\examples\ejb\basic\ValidateBean>javac ValidateBean
    .java
    ValidateBean.java:3: Package javax.ejb not found in import.
    import javax.ejb.*;
    ^
    ValidateBean.java:4: Class javax.ejb.CreateException not found in import.
    import javax.ejb.CreateException;
    ^
    ValidateBean.java:5: Class javax.ejb.SessionBean not found in import.
    import javax.ejb.SessionBean;
    ^
    ValidateBean.java:6: Class javax.ejb.SessionContext not found in import.
    import javax.ejb.SessionContext;
    ^
    ValidateBean.java:7: Class javax.naming.InitialContext not found in import.
    import javax.naming.InitialContext;
    ^
    ValidateBean.java:8: Class javax.naming.NamingException not found in import.
    import javax.naming.NamingException;
    ^
    ValidateBean.java:9: Package javax.sql not found in import.
    import javax.sql.*;
    ^
    ValidateBean.java:15: Interface javax.ejb.SessionBean of class examples.ejb.basi
    c.ValidateBean.ValidateBean not found.
    public class ValidateBean implements SessionBean {
    ^
    8 errors
    for these errors do i have to install any other package and
    what are the classpath settings required.
    and in which *.jar file, these classes and packages are available

    javax.ejb.* is in j2ee.jar
    if you use weblogic6.0, you need download ejb20.jar from http://www.weblogic.com
    if you use weblogic6.1 ,you need't this file.

  • Getting started with import javax

    I'm working my way through tutorials re java 1.2, on linux.
    I have had no problem (so far) with code using import java.text.*; import java.util.*; etc But at import javax.swing.*; trying to work with JFrame, I get error - Package javax.swing not found in import.
    I'm a bit lost as none of the text seems to anticipate such a problem. Can anyone help.
    Thanks Richard

    it sounds like you are using an older version of java that does not yet support swing swing is new to to java since the java 2 platform. maybe you don't have that version on your computer of you are compiling with an older version try checking your verseion ( sorry i keep forgetting the numbers in wich the released swing)..

  • Problem importing javax.mail.*

    Hey,
    I just installed the Java JDK 6 update 16 (windows platform). I am not able to compile a sample code that used the javax.mail package. I am not able to get past the
    import javax.mail.*;
    line. The compiles says "package javax.mail does not exist"
    I tried separately installing the JavaMail 1.4.2 API and setting the classpath to the mail.jar file as suggested in the readme.txt for this API, but I still get the same problem. Anyone has any suggestions?
    Thanks!

    Hi! I see you've answered similar problems before - but nothing seems to be working for me.
    My OS is Vista. I installed the JDK 6 update 16 just yesterday. I'm using the command line javac.
    I can see the mail.jar file in this folder: C:\Sun\SDK\lib\ and I've set the classpath using : set classpath=%classpath%;C:\Sun\SDK\lib\mail.jar
    When I type set classpath at the prompt, I can see that the classpath has been set correctly.
    Please help!

  • Import javax.swing.*;

    I start my programm with:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import rechenwerk.Rechenwerk; import rechenwerk.RechenwerkFassade;
    import zahl.Zahl; import zahl.ZahlFassade;
    import oberflaeche.Oberflaeche;
    At "import javax.swing.*" i get the failure message from the compiler:
    Oktalrechner.java:8: Package javax.swing not found in import.
    import javax.swing.*;
    What is wrong? I don't know-please help me.
    I'm using JDK1.2BETA4

    Tell me when you execute java -version, what you are getting?
    Looks like you are suing old JDK.
    Download the latest public release JDK1.4 from http://java.sun.com
    /Sreenivasa Kumar Majji.
    Did somebody help you? I have a similar problem with
    javax.resource... :(
    I start my programm with:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import rechenwerk.Rechenwerk; import
    rechenwerk.RechenwerkFassade;
    import zahl.Zahl; import zahl.ZahlFassade;
    import oberflaeche.Oberflaeche;
    At "import javax.swing.*" i get the failure message
    from the compiler:
    Oktalrechner.java:8: Package javax.swing not foundin
    import.
    import javax.swing.*;
    What is wrong? I don't know-please help me.
    I'm using JDK1.2BETA4

  • Having problems compiling *.java with import javax.servlet.jsp......

    I've been trying to do the tutorials in a book titled Apache Jakarta-Tomcat as part of my introduction to JSP. I'm new to Java but do know the basics. I have on my machine Java 1.3, Java 1.4, Java FrameWorks 2.1 and Jython 2.1 on Win2000 Pro. So enough about my configuration. I have never worked with packages also.
    I downloaded the files from the books site due to the fact I make a lot of typos when hand coding Java (I've become a pretty good debugger of my own code). But everytime I go to compile the *.java I get error messages. So below you will find HelloTag.java and beneath that the error messages that are thrown when I try and compile it. I tested other bits of *.java and have had no problem compiling them. Is there a JSP module I'm missing?
    Am I doing something wrong or am I missing something from my configuration.
    Marijan Madunic
    package chapter2;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspTagException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class HelloTag extends TagSupport
    public void HelloTag() {
    // Method called when the closing hello tag is encountered
    public int doEndTag() throws JspException {
    try {
    // We use the pageContext to get a Writer
    // We then print the text string Hello
    pageContext.getOut().print("Hello");
    catch (Exception e) {
    throw new JspTagException(e.getMessage());
    // We want to return SKIP_BODY because this Tag does not support
    // a Tag Body
    return SKIP_BODY;
    public void release() {
    // Call the parent's release to release any resources
    // used by the parent tag.
    // This is just good practice for when you start creating
    // hierarchies of tags.
    super.release();
    D:\Java\JDK 1.3\bin>javac HelloTag.java
    HelloTag.java:3: cannot resolve symbol
    symbol : class JspException
    location: package jsp
    import javax.servlet.jsp.JspException;
    ^
    HelloTag.java:4: cannot resolve symbol
    symbol : class JspTagException
    location: package jsp
    import javax.servlet.jsp.JspTagException;
    ^
    HelloTag.java:5: cannot resolve symbol
    symbol : class TagSupport
    location: package tagext
    import javax.servlet.jsp.tagext.TagSupport;
    ^
    HelloTag.java:7: cannot resolve symbol
    symbol : class TagSupport
    location: class chapter2.HelloTag
    public class HelloTag extends TagSupport
    ^
    HelloTag.java:14: cannot resolve symbol
    symbol : class JspException
    location: class chapter2.HelloTag
    public int doEndTag() throws JspException {
    ^
    HelloTag.java:20: cannot resolve symbol
    symbol : variable pageContext
    location: class chapter2.HelloTag
    pageContext.getOut().print("Hello");
    ^
    HelloTag.java:24: cannot resolve symbol
    symbol : class JspTagException
    location: class chapter2.HelloTag
    throw new JspTagException(e.getMessage());
    ^
    HelloTag.java:28: cannot resolve symbol
    symbol : variable SKIP_BODY
    location: class chapter2.HelloTag
    return SKIP_BODY;
    ^
    HelloTag.java:37: cannot resolve symbol
    symbol : variable super
    location: class chapter2.HelloTag
    super.release();
    ^
    9 errors

    Well, it looks like you've not got the servlet development kit JAR on your classpath. I think it'll probably be called servlet.jar on your system. Add that to the classpath if it's not already there.
    Incidentally, you've bumped into one of the areas Java's slightly lenient - declaring a method that looks like a constructor:
    public HelloTag() { }
    public void HelloTag() { }The first is a constructor, the second is a normal method. I'm assuming you intended to have the former instead of the latter.
    Anyway, hope this helps.

  • How to import a package in jsp

    i've searching here and i've not found answer to this, so i write it here.
    i've created a class to send mail, it imports the javax.mail.* and javax.activation.*, in a package named jspbeans.
    now, when i try to use this package in my jsp page (using tomcat), gives me the error:
    Package jspbeans not found in import
    import jspbeans.*;
    the code for my jsp page is:
    <%@ page language="java" %>
    <html>
    <head>
    <title>Sending mail from JSP</title>
    </head>
    <body>
    <%@ page import="jspbeans.*"%>
    <jsp:usebean id="sendmail" class="jspbeans.SendMail" scope="page"/>
    <jsp:setProperty name="sendmail" property="host" value="mail.wavelinksystems.com"/>
    <jsp:setProperty name="sendmail" property="to" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="from" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="msg" value="testing 1 2 3..."/>
    <jsp:setProperty name="sendmail" property="subject" value="test"/>
    <%//sendmail.send();%>
    <p>
    Mail has been sent to <jsp:getProperty name="sendmail" property="to"/>
    </body>
    </html>and the path of this jsp page is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspMailTest.jsp
    the path for the package is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspbeans
    what am i doing wrong?
    what am i missing?
    how do i have to import the package?
    thanks

    it generates a
    java.lang.NoClassDefFoundError: javax/mail/MessagingException
    i changed the package to that directory and the import generates no errors, if i do nothing but the import, and soem printing, the page is generated, but when i try to assign the variables, generates that error, why is it?

  • Problem with importing jsp packages

    Hi guys. I'm having a problem compiling a class that imports jsp packages.
    I'm getting errors along the lines of:
    C:\>javac HelloTag.java
    HelloTag.java:4: package javax.servlet.jsp does not exist
    import javax.servlet.jsp.*;
    ^
    HelloTag.java:5: package javax.servlet.jsp.tagext does not exist
    import javax.servlet.jsp.tagext.*;
    - I've copied jsp-api.jar and servlet-api.jar to a folder that's in my path: C:\Program Files\Java\jre1.5.0_03\lib\ext
    Any suggestion?
    Thanks.

    U have to add the path into the classpath
    set CLASSPATH=%CLASSPATH%;jsp-api.jar ....
    the compile in the same cmd window
    Do not use the CLASSPATH environment variable. Use the -classpath option while compiling and specify the path to your jar file.
    javac -classpath <path to jar file> filename.javacheers,
    ram.

  • Import javax.servlet.jsp.*;

    I am new to JSP.I getting errors in compilation.Can anyone please tell me the following import file can be found in which development kit.
    "import javax.servlet.jsp.*;

    You can download J2EE from sun's website. What you need is servlet.jar package. Put it in your CLASSPATH.

  • 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

  • Import javax.mail.* problem ...

    I have added the line 'import javax.mail.*;' to the top of my program and got the compiler error 'Package javax.mail not found in import'. I have since read through loads of similar problems on this forum and have tried the following :-
    Downloaded jaf-1_0_2.zip and javamail-1_3.zip from the Sun site, unzipped them, and placed mail.jar and activation.jar onto my PC. I have added these .jar files into my classpath and re-booted my PC. However, I STILL get the same compiler message and it's doing my head in! Do I somehow need to add the .jar files into my project? Or am I just being very thick? I am developing using Visual Cafe 3.0. I am using JDK 1.2.2.
    I am quite new to this and I have not even started to code the e-mailing method yet - I'm simply trying to get the import working.
    Any help would be much appreciated and would mean I can sleep tonight!
    Thanks in advance.

    Hi,
    check where you have placed the mail.jar file.....give the proper classpath where you have placed the jar file....
    check this out....it will compile...

  • Import javax.xml.ws.Service not found

    I am getting error import javax.xml.ws.Service not found. Which jar file I should add in JDeveloper and from where?
    This is my program:
    package examples.shop.client;
    import java.net.URL;
    import javax.xml.namespace.QName;
    import javax.xml.ws.Service;
    import examples.shop.impl.session.PricerBean;
    * This class is an example of a standalone JAX-RPC client code which uses both
    * the static stub and the dynamic proxy approach to get a reference to the
    * remote Web Service
    public class PricerClient {
    static String host = "localhost";
    static String portType = "PricerBean";
    static String serviceName = "PricerService";
    static String serviceEndpointAddress =
    "http://" + host + ":8080/" + serviceName;
    static String nameSpace = "urn:session.impl.shop.examples";
    public static void main(String[] args) throws Exception {
    URL wsdlLocation =
    new URL(serviceEndpointAddress + "/" + portType + "?WSDL");
    QName serviceNameQ = new QName(nameSpace, serviceName);
    // dynamic service usage
    Service service = Service.create(wsdlLocation, serviceNameQ);
    PricerBean pricerPort = service.getPort(PricerBean.class);
    String user = "Gerald";
    System.out.println("Tax rate: " + pricerPort.getTaxRate());
    System.out.println("Discount for : " + user + " is " +
    pricerPort.getPersonalDiscountRate(user));
    System.out.println("Discount for 1 item (at $1000,- per piece) for " +
    user + " is " +
    pricerPort.getDiscount(1, 1000, user));
    System.out.println("Discount for 5 items (at $1000,- per piece) for " +
    user + " is " +
    pricerPort.getDiscount(5, 5000, user));
    Thank you.

    I have Oracle JDeveloper Studio Edition Version 10.1.3.2.0.4066.
    Please note I have already added following libaries, jars to Tool->Project Properties->Libraries in JDeveloper.
    EJB3.0, TopLink Essentials JPA, J2EE, Jws-api.jar, Ejb30.jar, JSP Runtime, JAX-RPC Client, TopLink, JDeveloper Runtime, Embedded OC4J client, Jaxrpc-api.jar, Wsserver.jar
    Thank you.

Maybe you are looking for

  • How do I get a refund on a bad app

    Bought an App today for my iPhone and it doesn't do what I bought it for. Seems the description implied a feature that doesn't actually exist. Anyone know how to get a refund from the App Store on a bad App?

  • Re: Message from Crystal Reports Design forum moderators

    If you, the moderator, feel some post is inappropriate in some manner, could you perhaps provide feedback to the individual concerned.  Lecturing the entire community with broad references to "abuse" leaves us with nothing but insecurity and uncertai

  • Tiny insect in my display!

    Believe it or not, it looks like I'm not the first to post something like this but I thought I'd give it a shot regardless. I have a 24" LCD display (the LED display) and when I sat down to work today, I noticed a tiny bug crawling around. When I tri

  • Start numbers at 0001 when renaming files

    Up until upgrading to Yosemite I was able to select a bunch of files, right click to get the menu pulldown and hit Rename to get a more comprehemsive Rename options window. I could, for example, rename the Name and Index and choose a zero in the Numb

  • [svn:fx-trunk] 12275: Blocked 3.x revision 12023

    Revision: 12275 Revision: 12275 Author:   [email protected] Date:     2009-11-30 08:58:35 -0800 (Mon, 30 Nov 2009) Log Message: Blocked 3.x revision 12023   r12023 | [email protected] | 2009-11-19 20:37:22 -0500 (Thu, 19 Nov 2009) | 10 lines   Back-p