Package javax.ejb not found error

Hi there,
I've downloaded j2se 1.4 and j2ee 1.3.1 and installed it on Windows XP. I set the environment variables as described. When I compile a .java file that imports the javax.ejb.* package, then I get an error "package javax.ejb not found". I feel like an idiot and I know it's something to do with the environment variables. (or just XP, most likely)
Thanks in advance
Hoenner

How are you compiling your source? If you're using an IDE then you should edit your project classpath to include the j2ee.jar file (it'll probably be in the lib directory of your J2EE installation).
If you're doing it from the command line then type in SET CLASSPATH, look at the classpath it returns and check that it includes the j2ee.jar file.
Hope this helps.

Similar Messages

  • Package javax.servlet not found error

    package javax.servlet not found error. how it can be solved.
    plz help this is my first servlet program.
    vipin

    You need a jar file that has in it the javax.servlet.* classes
    It should be distributed with your servlet/jsp server.
    It can normally be found in a /lib directory under the installation.
    Some examples:
    Tomcat4: install_dir\common\lib\servlet.jar
    Tomcat5: install_dir\common\lib\servlet-api.jar; install_dir\common\lib\jsp-api.jar
    J2sdkee: install_dir/lib/j2ee.jar
    You need to include this jar file in your classpath when you compile any servlet.

  • Package javax.swing not found in import!

    I recently installed JDK 1.3.1_02 on WinNT4.0 and I cannot compile javax
    packages without getting the following error:
    Package javax.swing not found in import
    I've tried every combination of modifying the CLASSPATH system variable
    I can think of. I have no problem compiling java packages but not
    javax packages. I followed the installation instructions to the letter.
    What am I missing? Surely someone is running the same version of
    the JDK I am on WinNT 4.0.

    Thanks again!!! I had an older version of javac running on my system any time I ran
    outside of the bin where the latest javac was installed. I removed the older version
    of the jdk and now I can compile from any directory. I really appreciate the help,
    I was wracking my brain.
    By the way, -version is not a valid flag for javac.exe, although it is for java.exe.
    signed,
    grateful in cyberspace

  • Package javax.mail not found in import.

    hi,
    i am trying to develop a mail application using jsp, i have jaf1.0.1 and javamail API and the application was working fine on weblogic but when i tried to do the same thing on Apache server the Package javax.mail not found in import. is occuring,
    What could be the problem can any one explain...
    Thanks

    I think you have not placed mail.jar and activation.jar files in the /jre/lib/ext directory. Just place the mail.jar and activation.jar files in the jdk's /jre/lib/ext directory and check out. This will work for you.
    Rkanthj

  • Package corejava.Math not found error !??

    hi, I tried to compile this code but got the
    following error message ----
    what does it mean ????
    ==================================================
    TextSummary.java:17: Package corejava.Math not found in import.
    import corejava.Math.*;
    ^
    TextSummary.java:18: Package corejava not found in import.
    import corejava.*;
    ^
    2 errors
    ==================================================
    /** * @(#)TextSummary.java * * Copyright (c) 2000 by Sundar Dorai-Raj
    * * @author Sundar Dorai-Raj
    * * Email: [email protected]
    * * This program is free software; you can redistribute it and/or
    * * modify it under the terms of the GNU General Public License
    * * as published by the Free Software Foundation; either version 2
    * * of the License, or (at your option) any later version,
    * * provided that any use properly credits the author.
    * * This program is distributed in the hope that it will be useful,
    * * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * * GNU General Public License for more details at http://www.gnu.org * * */
    package corejava.Graphics;
    import java.awt.*;
    import corejava.Math.*;
    import corejava.*;
    public class TextSummary extends Canvas {
    private Univariate x=null;
    private int width,height;
    private Dimension size;
    private Font font;
    private boolean box;
    private int[] margins;
    private Color textColor;
    private Image offScrImage;
    private Graphics offScrGraphics;
    /* define constants */
    public final static Font DEFAULT_FONT=new Font("Courier",Font.PLAIN,10);
    public final static Color DEFAULT_COLOR=Color.black;
    public final static Format f=new Format("%1.4f");
    public TextSummary() { super(); }
    public void addNotify() {
    super.addNotify();
    offScrImage=createImage(width,height);
    offScrGraphics=offScrImage.getGraphics();
    public void update(Graphics g) {
    paint(offScrGraphics);
    g.drawImage(offScrImage,0,0,this);
    public TextSummary(int width,int height) {
    this.width=width;
    this.height=height;
    size=new Dimension(width,height);
    margins=new int[4];
    margins[0]=10;
    margins[1]=10;
    margins[2]=10;
    margins[3]=10;
    super.setBackground(Color.white);
    box=false;
    font=DEFAULT_FONT;
    textColor=DEFAULT_COLOR;
    public TextSummary(int width,int height,Font font,Color textColor) {
    this.width=width;
    this.height=height;
    size=new Dimension(width,height);
    margins=new int[4];
    margins[0]=10;
    margins[1]=10;
    margins[2]=10;
    margins[3]=10;
    super.setBackground(Color.white);
    box=false;
    this.font=font;
    this.textColor=textColor;
    public TextSummary(int width,int height,boolean box) {
    this.width=width;
    this.height=height;
    size=new Dimension(width,height);
    this.box=box;
    margins=new int[4];
    margins[0]=10;
    margins[1]=10;
    margins[2]=10;
    margins[3]=10;
    super.setBackground(Color.white);
    font=DEFAULT_FONT;
    textColor=DEFAULT_COLOR;
    public TextSummary(int width,int height,Font font,Color textColor,boolean box) {
    this.width=width;
    this.height=height;
    size=new Dimension(width,height);
    this.box=box;
    margins=new int[4];
    margins[0]=10;
    margins[1]=10;
    margins[2]=10;
    margins[3]=10;
    super.setBackground(Color.white);
    this.font=font;
    this.textColor=textColor;
    public void newData(double[] data,boolean plot) {
    x=new Univariate(data);
    if(plot) repaint();
    public void newData(Univariate data,boolean plot) {
    x=data;
    if(plot) repaint();
    public void setMargins(int[] margins) {
    this.margins=(int[])margins.clone();
    public void setGraphicsParams(Font font,Color textColor,boolean box) {
    this.font=font;
    this.textColor=textColor;
    this.box=box;
    public void paint(Graphics g) {
    if(x==null) return;
    g.setColor(Color.white);
    g.fillRect(0,0,width-1,height-1);
    g.setFont(font);
    g.setColor(textColor);
    FontMetrics fm=getFontMetrics(font);
    int yOrigin=height,
    xOrigin=0,
    bottom=-margins[0],
    left=margins[1],
    top=margins[2],
    right=margins[3],
    center=(int)((width-left-right)*.5),
    quarter=(int)((width-left-right)*0.25),
    textWidth,
    textHeight=fm.getHeight();
    textWidth=fm.stringWidth("Summary");
    g.drawString("Summary",left+center-(int)(textWidth*.5),top+textHeight);
    g.drawLine(left,top+textHeight+2,width-right,top+textHeight+2);
    g.drawLine(left,top+textHeight+3,width-right,top+textHeight+3);
    textWidth=fm.stringWidth("N");
    g.drawString("N",quarter-textWidth,top+2*textHeight);
    textWidth=fm.stringWidth(""+x.size());
    g.drawString(""+x.size(),center-textWidth,top+2*textHeight);
    textWidth=fm.stringWidth("Mean");
    g.drawString("Mean",quarter-textWidth,top+3*textHeight);
    textWidth=fm.stringWidth(f.form(x.mean()));
    g.drawString(f.form(x.mean()),center-textWidth,top+3*textHeight);
    textWidth=fm.stringWidth("Var");
    g.drawString("Var",quarter-textWidth,top+4*textHeight);
    textWidth=fm.stringWidth(f.form(x.variance()));
    g.drawString(f.form(x.variance()),center-textWidth,top+4*textHeight);
    textWidth=fm.stringWidth("Stdev");
    g.drawString("Stdev",quarter-textWidth,top+5*textHeight);
    textWidth=fm.stringWidth(f.form(x.stdev()));
    g.drawString(f.form(x.stdev()),center-textWidth,top+5*textHeight);
    textWidth=fm.stringWidth("SE");
    g.drawString("SE",quarter-textWidth,top+6*textHeight);
    textWidth=fm.stringWidth(f.form(x.SE()));
    g.drawString(f.form(x.SE()),center-textWidth,top+6*textHeight);
    textWidth=fm.stringWidth("Min");
    g.drawString("Min",3*quarter-textWidth,top+2*textHeight);
    textWidth=fm.stringWidth(f.form(x.min()));
    g.drawString(f.form(x.min()),width-right-textWidth,top+2*textHeight);
    textWidth=fm.stringWidth("Q1");
    g.drawString("Q1",3*quarter-textWidth,top+3*textHeight);
    textWidth=fm.stringWidth(f.form(x.quant(0.25)));
    g.drawString(f.form(x.quant(0.25)),width-right-textWidth,top+3*textHeight);
    textWidth=fm.stringWidth("Median");
    g.drawString("Median",3*quarter-textWidth,top+4*textHeight);
    textWidth=fm.stringWidth(f.form(x.median()));
    g.drawString(f.form(x.median()),width-right-textWidth,top+4*textHeight);
    textWidth=fm.stringWidth("Q3");
    g.drawString("Q3",3*quarter-textWidth,top+5*textHeight);
    textWidth=fm.stringWidth(f.form(x.quant(0.75)));
    g.drawString(f.form(x.quant(0.75)),width-right-textWidth,top+5*textHeight);
    textWidth=fm.stringWidth("Max");
    g.drawString("Max",3*quarter-textWidth,top+6*textHeight);
    textWidth=fm.stringWidth(f.form(x.max()));
    g.drawString(f.form(x.max()),width-right-textWidth,top+6*textHeight);
    g.drawLine(left,top+6*textHeight+2,width-right,top+6*textHeight+2);
    g.drawLine(left,top+6*textHeight+3,width-right,top+6*textHeight+3);
    /* Canvas Functions */
    public Dimension getPreferredSize() {
    return(size);
    public Dimension getMinimumSize() {
    return(size);

    I'd guess there's a package corejava.Math, which is needed for this code to compile, but you don't have it...

  • Javax.ejb NOT FOUND

    Hi anyone,
    I am creating an Entity Bean, and I have imported javax.ejb.EntityBean. I get an error during compilation
    " javax.ejb.EntityBean package not found"
    I am using jdk1.2.2 I even tried with jdk1.3.
    My query is:
    Q1. Which is the jar in jdk which provides class files for javax.ejb.EntityBean package ?
    thanks
    vikas

    It is in j2ee_home\lib directory. Include this in the classpath.
    -Siva

  • Package javax.faces not found

    Hi,
    I tried to import the package javax.faces.* but it can not be resolved. Do I have to download this package myself? I'm using jre1.5.
    Thanks!

    JSF isn't part of core Java. You need to download it separately, in a number of ways, and then include it in your compile-time classpath, and put it somewhere your container can get hold of it, too

  • Package javax.servlet not found in sdk 1.4.0_01

    Hi,
    Please correct me if i'm wrong. I was using j2sdk 1.3.1 (standard edition) and have recently upgraded to j2sdk1.4.0_01. I can't find the javax.servlet package in the API. I referred to the j2ee sdk and found the package there. Does it mean that I need to have both the j2sdk1.4.0_01 and the j2sdkee1.3.1 (j2ee) in order to be able to compile and run my codes?
    Thanks.
    Karen

    The servlet packages don't come with the standard SDK.
    You can get them from javasoft.com or if you use the
    Tomcat server they come packaged in a jar file called
    servlet.jar

  • Import javax.crypto not found error

    Hi,
    I have just installed the JDK1.7 on a windows machine.
    Whenever I try to compile my module, I get an error on the import javax.crypto line. It tells me that it can't the javax\Crypto\Cipher.class.
    I have the jdk installed on d:\glassfish3 and am pointing the classpath to d:\glassfish3\jdk7 (also tried d:\glassfish3\jdk7\jre as well) with no luck.
    Any help would be greatly appreciated.
    Thanks,
    Drew Nathanson
    Technical Synergy, Inc.

    Thanks. Maybe I should explain a little better.
    I am using JBuilder 2006 to my IDE. This environment requires that you put in the path to the JRE/JDK.
    I have uninstalled and downloaded the jdk again and this time i'm getting a strange error:
    "test.java": cannot access javax.crypto.Cipher; bad class file: D:\Program Files\Java\jre7\lib\jce.jar\javax\crypto\Cipher.class, class file has wrong version 51.0, should be 49.0, Please remove or make sure it appears in the correct subdirectory of the classpath. at line 19, column 21
    Now this is strange because i'm using the right library.
    Is there something that I'm missing here?
    Again, thanks for your help.
    Drew Nathanson

  • Javax class not found error.

    First and formost, apologies if this is in the wrong forum.
    I'm running NB 6.1 and trying to add the new kewl mysql features to my servlet. It automatically added all the code and inserted imports for javax.
    For some reason it says that it can't find the following classes:
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;However it does recognise that javax.persistence exists.
    I've tried running it with both jdk 5 & 6 with no luck.
    I'm sure Javax is inbuilt, Is there something I'm missing?

    Ok, the classes are included if the glassfish server is running, since I'm running Tomcat I created a library with all the classes in it and added it to my project.
    I was then able to use the entity classes I created with no bother.
    Then I proceeded to install RESTful webservices. and add the restfull webservices to the project.
    Now if I run/debug the main project, it doesn't run my main servlet!!!
    When running test Restful webservices I receives: Cannot acces WADL: Please restart your RESTfull webservices and reload this page.
    How do I get the project to run the orginal servlet now and bypass the restfull web service?
    How do I fix the Restfull problem

  • Compiling servlets - package javax.servlet not found

    I can't seem to get the previous questions on this topic - get a page error. I've recently installed j2ee1.4 and j2sdk1.4.1_01 on Win98. I think I've set the CLASSPATH and PATH correctly (and JAVA_HOME). What have I missed?

    servlet.jar in your classpath...

  • Import javax.mail not found

    Hello,
    I am new to Java Mail. I wanted to test my first programme. When I compile, I get this errors.
    package javax.mail not found in import and so on. I have set my classpath to so
    set classpath = %classpath%;C:\j2sdk1.4.0\lib\mail.jar;C:\j2sdk1.4.0\lib\activation.jar
    I included the mail.jar,smtp.jar and activation.jar in the lib directory of my jdk e.g c:\j2sdk1.4.0\lib\ "the jar file".
    Can any one tell me what I am missing here?
    Thanks
    James

    the easiest way to do this is to put
    activation.jar
    mail.jar          
    mailapi.jar     
    imap.jar     
    smtp.jar          
    pop3.jar
    into the virtual machine directory C:\Program Files\JavaSoft\JRE\1.3.1\lib\ext
    or the lib\ext directory of whatever virtual machine you are using
    and put coppies of them in JDK
    C:\j2sdk1.4.0-beta3\jre\lib\ext
    or jre\lib\ext
    of whatever JDK you are using
    this way they are found automaticaly
    no need for classpath

  • "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!

  • Trying to track a package on FedEx website and get "Framework Not Found" error message

    Either by clicking on the email from FedEx and launching Firefox or by opening the FedEx website and entering the tracking number, I get "Framework not found" error and the search stops. It worked with previous Firefox versions but not with the new 4.0.1 version. Any suggestions?

    I tried it with firefox and chrome and have the problem in both browsers, so it is not browser specific.

  • Getting 104 resource not found error, when deploying my first servlet

    Hi,
    I am new to servlets, and after doing little home work i have created a small servlet but i am i getting http 104 resource not found error.
    steps i followed:
    1) installed pre-configured version of tomcat from http://www.coreservlets.com/Apache-Tomcat-Tutorial/.
    2)created new directory called ch1 under webapps, created WEB-INF under ch1
    3)included web.xml, classes in WEB-INF directly
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    version="2.5">
    <servlet>
    <servlet-name>Ch1servlet</servlet-name>
    <servlet-class>Ch1servlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Ch1servlet</servlet-name>
    <url-pattern>/servlet</url-pattern>
    </servlet-mapping>
    </web-app>
    4) included .class file under classes folder from following Ch1servlet.java file, I have set class path to point to servlet-api.jar file and jsp-api.jar and compliled following java file to get .class file which is included in classes folder
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Ch1servlet extends HttpServlet
    public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException
    response.setContentType("text/html");
    PrintWriter out=response.getWriter();
    java.util.Date today=new java.util.Date();
    out.println("<html>"+
    "<body>"+
    "<h1 align=center>HF\'s Chapter1 Servlet</h1>"
    +"<br>" + today + "</body>" + "</html>");
    5) I am started tomcat server and when typed http://localhost( changed port from 8080 to 80), its giving tomcat page and not showing any error
    6) When i typed http://localhost/ch1/servlet/Ch1servlet, its giving http 404 error
    type Status report
    message: /servlet/Ch1servlet
    description: The requested resource (/servlet/Ch1servlet) is not available.
    7) i have uncommented(it comes preconfigured) the invoker part in web.xml.
    I have tried including servlet in an package and without package
    I am not sure if its problem with server configuration orelse problem with my file placing.
    Please let me know if you have any idea what went wrong.

    I found this, unable to copy it, so i am typing it:
    Feb11,2008 11:55:57 AM org.apache.catalina.core.AprLifecycleLIstener init
    INFO: The Apache Tomcat Native Library which allows optimal performance in production environemnt was not found on the java.library.path:c:\program Files\Java\jdk1.6.0\bin;....
    last line says
    org.apache.cataline.startup.catalina start
    INfo: Server startup in 657ms

Maybe you are looking for

  • Scheduling function module execution in background jobs

    Hi, I have requirement where in after obtaining all the required inputs from the user we will call an function module to execute it. The requirement is that the execution of fm shld happen in background and a log must be created showing the user whth

  • How to suppress the Print Dialog Box?

    Running an (ASP.NET /Crystal Reports 2008) application and using CrystalReportViewer control. Is there way to suppress the print dialog box when I click the print icon on the report tool bar? Edited by: juRamz on Aug 26, 2009 2:54 PM

  • Ipad Cost of repair for no light display

    The display on my ipad2 won't come on. I believe the unit is on because the pc recognized it and I was able to back it up. Does anyone know if there is a fix or the approximate cost of repair?

  • Flash player download failed

    I tried downloading the latest flash player. Three times it stopped at 47 percent and told me to close internet explorer. I went for help and checked my internet tools, tried everything suggested. I clicked retry and the only option left was to abort

  • What is the "continue" char in SQL?

    If I'm writing a big like of code in SQL*Plus what is the char that I should use to break the line physically but not logically? Thanks. PB