Package does not exist error-message

When I try to compile a java servlet with the following piece of code I get a compilation error referring to the import statement.
I have just included the initial import statements. A large number of errors follow, as a result of this 'package does not exist error-message'.
Has anyone encountered this or any ideas?
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.* ;
import java.io.* ;
import java.sql.* ;
import com.ericsson.snf.mps.mppapi.mtlr.*;
The error messages come from the 'import com.ericsson.snf.........' statement.
I am trying to integrate ericsson software, into my application.
Thanks,
java-mobile-user

That's probably because you are trying to integrate j2me suff with j2se/ee. That won't work without los of extra work..

Similar Messages

  • Package does not exist error!

    Hello, I'm having trouble getting an application which uses a package to compile. This is from "Teach yourself Java in 21 day".
    The files are:-
    Item.java
    package ecommerce;
    import java.util.*;
    public class Item implements Comparable {
         private String id;
         private String name;
         private double retail;
         private int quantity;
         private double price;
         Item(String idIn, String nameIn, String retailIn, String quanIn)
              id = idIn;
              name = nameIn;
              retail = Double.parseDouble(retailIn);
              quantity = Integer.parseInt(quanIn);
              if(quantity > 400)
                   price = retail * .5D;
              else if (quantity > 200)
                   price = retail * .6D;
              else
                   price = retail * .7D;
              price = Math.floor( price * 100 + .5) / 100;
         public int compareTo(Object obj)
              Item temp = (Item)obj;
              if (this.price < temp.price)
                   return 1;
              else if (this.price > temp.price)
                   return -1;
              return 0;
         public String getId()
              return id;
         public String getName()
              return name;
         public double getRetail()
              return retail;
         public int getQuantity()
              return quantity;
         public double getPrice()
              return price;
    Storefront.java
    package ecommerce;
    import java.util.*;
    public class Storefront {
         private LinkedList catalog = new LinkedList();
         public void addItem(String id, String name, String price, String quant)
              Item it = new Item(id, name, price, quant);
              catalog.add(it);
         public Item getItem(int i)
              return (Item)catalog.get(i);
         public int getSize()
              return catalog.size();
         public void sort()
              Collections.sort(catalog);
    and the main class - Giftshop.Java
    import ecommerce.*;
    public class GiftShop{
         public static void main(String[] arguments){
              Storefront store = new Storefront();
              store.addItem("C01", "MUG", "9.99", "150");
              store.addItem("C02", "LG MUG", "12.99", "82");
              store.addItem("C03", "MOUSEPAD", "10.49", "800");
              store.addItem("D01", "T SHIRT", "16.99", "90");
              store.sort();
              for(int i = 0; i < store.getSize(); i++) {
                   Item show = (Item)store.getItem(i);
                   System.out.println("\nItem ID: " + show.getId() +
                             "\nName: " + show.getName() +
                             "\nRetail Price: $" + show.getRetail() +
                             "\nPrice: $" + show.getPrice() +
                             "\nQuantity: " + show.getQuantity());
    Item.java and Storefront.java are stored in:-
    C:\Program Files\Java\jdk1.5.0_12\package\ecommerce
    GiftShop.java is stored in:-
    C:\J21work
    My classpath is set to:-
    C:\J21work
    CLASSPATH=C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;C:\J21Work\;C:\J21Work\package\ecommerce\
    When I attempt to compile GiftShop.Java I get the following error message:-
    C:\J21work>javac GiftShop.java
    GiftShop.java:1: package ecommerce does not exist
    import ecommerce.*;
    ^
    GiftShop.java:5: cannot access Storefront
    bad class file: C:\J21Work\package\ecommerce\Storefront.class
    class file contains wrong class: ecommerce.Storefront
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    Storefront store = new Storefront();
    ^
    2 errors
    Thanks for taking the time to read this question.
    Edited by: lister27 on Sep 16, 2007 7:57 AM

    Hi,
    I have the same problem with the same code. I am trying to find what is wrong with my classpath.
    The class files of Item and Storefront are in C:\dev\java\org\cadenhead\ecommerce
    The GiftShop.java is in C:\dev\java\
    My classpath is .;C:\Program Files\Java\jdk1.6.0_03\lib\tools.jar;C:\dev\java\org\cadenhead\ecommerce;C:\dev\java;C:\J21work
    I appreciate any help.

  • Number range does not exist error message while releasing billing document

    Hi,
    We are trying to release a billing document to Accounting through VF02. But the system throws an error message that "For object RF_BELEG 1000, number range interval  does not exist FBN1".  Note : System does not specify which number range is missing...
    There are existing number range intervals for the company code which looks fine. Any advise where this number ranges are missing.
    Regards,
    Sakthy

    Hi,
    I suggest you to check the which document type has assigned for biiling document and against that document type , have to ssign the id for number range and check whethere internal assignment or external assignment.
    I hope this will make sense.
    Panneer

  • Package does not exist error. What am I doing?

    I would appreciate any ideas someone might have. I am doing a proof of concept
    on WLS 7.0.
    I deployed a ear file, containing a jar that has a Home, Remote and Bean class
    like this:
    com\co\test\SponsorHome.class
    The EJB is deployed fine to the server and I see it in the console and everything
    looks good.
    I wrote a JSP page to access the bean and this is the error I get:
    package com.co.test does not exist
    probably occurred due to an error in /testejb.jsp line 2:
    <%@ page import="com.co.test.*" %>
    It errors out on that line, right away. Any help would be greatly appreciated,
    I have been banging my head for two days on this one.
    Thanks,
    Matt

    If you package the JSP within the EAR (or an exploded EAR) then the
    server deploys them as the same unit. They're in the same classloader
    structure to the JSP compiler can see the EJB interface classes.
    When you deploy them separately, they're viewed by the server as
    separate applications. You'll have to include the EJB interface classes
    in the JSP's webapp.
    I'd recommend deploying them together in an exploded EAR.
    -- Rob
    Matt wrote:
    Rob,
    It is not. Is that not possible?
    Thanks,
    Matt
    Rob Woollen <[email protected]> wrote:
    Is the JSP packaged inside the EAR as well?
    -- Rob
    Matt wrote:
    I would appreciate any ideas someone might have. I am doing a proofof concept
    on WLS 7.0.
    I deployed a ear file, containing a jar that has a Home, Remote andBean class
    like this:
    com\co\test\SponsorHome.class
    The EJB is deployed fine to the server and I see it in the consoleand everything
    looks good.
    I wrote a JSP page to access the bean and this is the error I get:
    package com.co.test does not exist
    probably occurred due to an error in /testejb.jsp line 2:
    <%@ page import="com.co.test.*" %>
    It errors out on that line, right away. Any help would be greatly appreciated,
    I have been banging my head for two days on this one.
    Thanks,
    Matt

  • SAP TAO Consolidation & CBASE_INIT.VBS.txt does not exist  error message

    Hi All,
    I installed SAP TAO SP03 & have QC 10.0 & QTP 10.0 and recorded a sample transaction code and observedfollowing errors:
    i) I recorded a transaction and opened the script from "Consolidation" tab from Configuration Tab and got an error popup saying that u201CUnhandled exceptions have occurred"
    ii) Without using Consolidation, tried to run manually got an error saying that ""[QualityCenter] Subject\BPT Resources\Libraries\CBASE_Init.vbs.txt does not exist  but i uploaded the file in the same location.
    iii) Tried to recording using UI scanner and itu2019s not recognizing "Tabs" and some of the fields. I donu2019t know why some fields
    are missing and "Tabs" headings too. Like "BASIC data" "Payment Data" are two tabs so "BASIC DATA" is not recognizing and under that some of fields u201CInvoice dates, Posting Datesu201D fields are not scanning. So used Object Spy but itu2019s so challenge to scan each and every field.
    Please advice.
    Thanks a lot for your help and very much appreciated in advance.
    Regards,
    Ram
    Edited by: Rambabu Challa on Aug 25, 2010 9:14 AM
    Edited by: Rambabu Challa on Aug 25, 2010 9:16 AM
    Edited by: Rambabu Challa on Aug 25, 2010 9:20 AM

    Hi Guys,
    I have resolved the "CBASE" error but i am not able to resolve "Consolidation" error message: here is the more details about the error . Any thoughts please
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.
    Exception Text **************
    System: Object reference not set to an instance of an object.
       at SAP.TAO.HpIntegration.Consolidator.GetTestsInFolderNode(TreeNode targetNode, Int32[] icons)
       at SAP.TAO.Consolidation.PnlConsolidate.tvTestPlans_BeforeExpand(Object sender, TreeViewCancelEventArgs e)
       at System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
       at System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
       at System.Windows.Forms.TreeView.WmNotify(Message& m)
       at System.Windows.Forms.TreeView.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    SAPTAO
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAO.exe
    SAPTAOCommon
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOCommon.DLL
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    SAPTAOHpIntegration
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOHpIntegration.DLL
    SAPTAOHpQCNetModule
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOHpQCNetModule.DLL
    SAPTAOHpQCNetModule9
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOHpQCNetModule9.DLL
    Interop.TDAPIOLELib
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/Interop.TDAPIOLELib.DLL
    SAPTAOHpQCNetModule10
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOHpQCNetModule10.DLL
    SAPTAOSelfCheck
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOSelfCheck.DLL
    SAPTAOGuiScripting
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOGuiScripting.DLL
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    SAPTAOObjectSpyControl
        Assembly Version: 2.0.3.0
        Win32 Version: 2.0.3.0.201007020730
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/SAPTAOObjectSpyControl.DLL
    Interop.SapROTWr
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/Interop.SapROTWr.DLL
    Interop.SAPFEWSELib
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/Interop.SAPFEWSELib.DLL
    System.Management
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    Interop.TDAPIOLELIB10
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20TAO/Interop.TDAPIOLELIB10.DLL
    CustomMarshalers
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
    JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    And also tried to record a transaction and when i am running , it is take so much time to execute . I don't know why.
    Thanks for your inputs.
    Ram.

  • Item 000010 does not exist - Error Message V1331 in VA41

    Dear Experts,
    We r implementing PS module for a client.
    I am using a exit MV45AFZZ, in which i have a perform ZVALIDATEWBS, i am calling this include through a subroutine.
    In this ZVALIDATEWBS routine -> i have validated 2 conditions
    1. Validation for Partner function and
    2. Validation for WBS element.
    For 1 ---> I am comparing with VBPA partner and throwing error message if the partner entered doesnt match with the project code
    For 2 ---> i am checking the status in JEST table if STAT = 'I001'  and INACT field = 'X' for a object number i am throwing error as " WBS must be in u2018 Created-CRTDu2019 status".
    The problem which iam facing is...
    After entering the line item and WBS for the material and after doing Incompletion log and pressing save i am getting a error stating
    "Item 000010 does not exist"  ( Message no. V1331)
    When i comment the error message which is thrown in my exit i am able to save without any error message, i am not getting the standard error  -  "Item 000010 does not exist" (Message no V1331).
    When i debug the code i am not able to predict, becuse if i comment the messages(only message not the whole exit)  the standard program called is different, when i uncomment and check them its going for some different program.
    Kindly help me in this regard.
    thanks
    Krish

    Hello Krishna,
    Thanks for the reply
    this message was from the standard SAP i just copy pasted the message.
    a STOP icon in the front along with this following message -> "Item 000010 does not exist",
    If u can able to give ur mail id i can send the screen shot also. But any clues w.r.to this error.. anything should i need to check in.
    kindly advice
    thanks
    Krish.

  • Getting package does not exist error

    Hi,
    I am trying to run my first JSF project but getting following exception:-
    org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
    PWC6197: An error occurred at line: 14 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.jsf_core does not exist
    PWC6197: An error occurred at line: 14 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.jsf_core does not exist
    PWC6197: An error occurred at line: 14 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.jsf_core does not exist
    PWC6197: An error occurred at line: 15 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.html_basic does not exist
    PWC6197: An error occurred at line: 15 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.html_basic does not exist
    PWC6197: An error occurred at line: 15 in the jsp file: /index.jsp
    PWC6199: Generated servlet error:
    package com.sun.faces.taglib.html_basic does not exist
    I had created a war of my project and deployed on the glass fish server. I have put the required jar files in WEB-INF-> lib folder (jsf-api.jar, jsf-impl.jar, jstl-1.1.0.jar).
    Wondering why its not able to find the packages.
    Following is my index.jsp:-
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html>
      <head><title>Simple jsp page</title></head>
      <body>
      <f:view>
          <h:outputLabel value="Hello, world"/>
      </f:view>
      </body>
    </html>
    Please help.
    Thanks,
    Parikshit

    And why do you think those jars are required? Guess work? Glassfish already provides them, remove them from the application deployment and try again.

  • BUS2080 "OBJECT DOES NOT EXIST" error message....

    Hi Gurus,
    I am trying to create a workflow for Service Process Notification in SWDD using BO BUS2080 . The Work Flow is activated without any errors but when i enter the instance number it comes as "OBJECT DOES NOT EXIST".
    I created a subtype for BUS2080 ,delegated the object and i am using the parent object in my work flow.Please help me out in executing my Work Flow.
    Thanks,
    Syed.

    Please check first in SWO1 whether the object instance exist or not. I hope you are giving the right key fields. First test with correct key fields thru SWO1.
    <b>Reward points if useful</b>

  • "Archive file does not exist" error message in KSB1

    I'm fairly new to SAP, and I am receiving this error in KSB1:    Archive file 000786-002 CO_ITEM does not exist.
    When my co-worker runs the report using the same cost center, data is returned. We are running this for the current accounting period. Is there some kind of setting or other access I need in order to view this? Any help is much appreciated.

    Hi,
    Please, refer to note 143135.
    Regards,
    Eli

  • "package javax.media does not exist" error message. Help!

    May be this is a rookie problem, but I can't solve it by myself.
    I'm using JBuider X to develop a GUI, and need to capture an image, from a web cam or so, and to save it in DB.
    The problem is: I found some source codes wich are supposed to do this... but they references (imports) an javax.media class... and the JBuilder says that this class doesn't exists.
    Can anyone help me?
    Where can I get the class, and how I inform to JBuider where it's located?
    Thanks in advance.
    Ernesto Becker

    Project tab, "Build", Libraries -> import the JMF libraries. Something like that.

  • Error:  microedition.io.* package does not exists

    Been at this for a few days...frustration...funny.
    Using JDK 1.6 NetBeant 6.8 with WTK 2.5.2 on XP
    Was able to resolve the javax.bluetooth.* package does not exists and xylostudio by doing the following to add the libraries to the project file.
    1) Tools > Libraries
    2) in the pop up Library Manager window click 'New Library'
    3) in the pop up New Library window typed 'bluetooth' > OK
    3) highlight 'bluetooth' in Library Manager scroll menu on left
    4) click add JAR/Folder
    5) added jsr082 from C;\WTK2.5.2_01\lib\jsr082.jar
    6) click OK
    7) right click project and select properites
    8) highlight the library node under Categories on the left side of the Project Properties window
    9) 'Add Library' created 'bluetooth'
    10) click OK
    When the process was followed to resolve the microedition.io.* package does not exist error it was unsuccessful.
    The difference in the two processes being New Library name: 'microedition' and added jsr75, MIDPapi20, jsr118, then MIDPapi21 with no resolution to the errors.
    Also add the jsr75, MIDPapi20, jsr118, and MIDPapi21 directly to the project by clicking the 'Add JAR/Folder' button in the Project Properties window.
    Here is the Output:
    init:
    deps-clean:
    Updating property file: C:\Scholastic\4340MS\REU\ItsAForum\build\built-clean.properties
    Deleting directory C:\Scholastic\4340MS\REU\ItsAForum\build
    clean:
    init:
    deps-jar:
    Created dir: C:\Scholastic\4340MS\REU\ItsAForum\build
    Updating property file: C:\Scholastic\4340MS\REU\ItsAForum\build\built-jar.properties
    Created dir: C:\Scholastic\4340MS\REU\ItsAForum\build\classes
    Created dir: C:\Scholastic\4340MS\REU\ItsAForum\build\empty
    Compiling 8 source files to C:\Scholastic\4340MS\REU\ItsAForum\build\classes
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:8: cannot find symbol
    symbol : class Connector
    location: package javax.microedition.io
    import javax.microedition.io.Connector;
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:9: cannot find symbol
    symbol : class StreamConnection
    location: package javax.microedition.io
    import javax.microedition.io.StreamConnection;
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:10: cannot find symbol
    symbol : class StreamConnectionNotifier
    location: package javax.microedition.io
    import javax.microedition.io.StreamConnectionNotifier;
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:19: cannot find symbol
    symbol : class StreamConnectionNotifier
    location: class mobile.communication.Server
    private StreamConnectionNotifier server = null;
    ^
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:20: cannot find symbol
    symbol : class StreamConnection
    location: class mobile.communication.Server
    private StreamConnection connection = null;
    ^
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:58: cannot find symbol
    symbol : class StreamConnectionNotifier
    location: class mobile.communication.Server
    server = (StreamConnectionNotifier)Connector.open(URL);
    ^
    C:\Scholastic\4340MS\REU\ItsAForum\src\mobile\communication\Server.java:58: cannot find symbol
    symbol : variable Connector
    location: class mobile.communication.Server
    server = (StreamConnectionNotifier)Connector.open(URL);
    ^
    7 errors
    C:\Scholastic\4340MS\REU\ItsAForum\nbproject\build-impl.xml:413: The following error occurred while executing this line:
    C:\Scholastic\4340MS\REU\ItsAForum\nbproject\build-impl.xml:199: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 4 seconds)
    any information would be much appreciated. Thanks,
    LD

    By completing the process shown in below link and adding the bluecove jar file directly to the project as of the reply post suggests, all compilation errors were corrected.
    http://forums.netbeans.org/viewtopic.php?t=22823&start=0&postdays=0&postorder=asc&highlight=microedition
    Thanks me for point me in the right direction,
    Me is happy.

  • Import statement reports 'package does not exist'

    I am seeing another odd error. I'm working on learning how to read and write to text files, and I have 2 errors reported, but one is obviously caused by the other. My package is labeled as such (copy>paste of package line):
    package michaelchristopherp4db;
    and the import line is this (copy>paste again):
    import michaelchristopherp4db.ProductRecord;
    However, Netbeans looks at the import and flags it red, saying package michaelchristopherp4db does not exist. this caused my line:
    ProductRecord product = new ProductRecord();
    to also be flagged in red as it cannot find the ProductRecord class. However, it has no problems with any of the product.get* method calls. Thank you in advance for any ideas or input.
    here is the full code of the file reporting the errors.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package michaelchristopherp4db2;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.lang.IllegalStateException;
    import java.lang.SecurityException;
    import java.util.NoSuchElementException;
    import java.util.Formatter;
    import java.util.FormatterClosedException;
    import java.util.Scanner;
    import michaelchristopherp4db.ProductRecord;
    /*  @author info
    public class readTxt
        private Scanner txtfile;
        private Formatter wishList;
        private Formatter giftIdeas;
        private Formatter priceError;
        //let user open file
        public void openFile()
        {//open method openFile
            try
            {//open try block
                priceError = new Formatter("priceerror.txt");//open object for items with invalid prices
                giftIdeas = new Formatter("giftideas.txt");//open object for gift ideas
                wishList = new Formatter("wishlist.txt");//open object for wish list
                txtfile = new Scanner(new File("products.txt"));//tell the compiler which file to use for input
            }//close try block
            catch (FileNotFoundException fileNotFoundException)
            {//open file not found catch block
                System.err.println("Error opening or creating file.");
                System.exit(1);
            }//close file not found catch block
            catch ( SecurityException securityException )
            {//start catch for SecurityException
                System.err.println("File Write access is denied.");
                System.exit(1);//END PROGRAM
            }//end catch
        }//close openFile method
        public void readProducts()
        {//open readProducts method
            ProductRecord product = new ProductRecord();//create object to hold read data
            //print headers for for output columns
            System.out.printf("%-10s%-12s%10s\n", "Product ID", "Product Name", "Price");
            try //read records from the file
            {//open try block
                while (txtfile.hasNext())
                {//open while
                    product.setproductID(txtfile.nextInt());//get productID
                    product.setproductName(txtfile.next());//get product name
                    product.setproductPrice(txtfile.nextDouble());//get product price
                    //print collected product details
                    System.out.printf("%-10d%-12s%10.2f\n", product.getproductID(),
                            product.getproductName(), product.getproductPrice());
                    if (product.getproductPrice()>50.0)
                    {//open if to store items $50 or more to wishlist.txt
                        wishList.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close if $50 or greater
                    else if (product.getproductPrice()<0.0)
                    {//open if less than zero
                        priceError.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close if less than zero
                    else
                    {//open else for gift ideas from $0 to $50
                        giftIdeas.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close else for gift ideas
                }//close while
            }//close try block
            catch (NoSuchElementException elementException)
            {//open no such element exception catch
                System.err.println("File improperly formed.");
                txtfile.close();//close text file
                System.exit(1);
            }//close no such element exception catch
            catch (IllegalStateException stateException)
            {//open illegal state exception catch
                System.err.println("Error reading from file.");
                System.exit(1);
            }//close illegal state exception catch
        }//close readProducts method
        //close file and end application
        public void closeFile()
        {//open closeFile method
            if (txtfile != null)
                txtfile.close();//close file
        }//close closeFile method
    }//end application readTxtAnd the code at the top of the class I am trying to import (so you can see the package I am trying to import)
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package michaelchristopherp4db;
    *  @author
    public class ProductRecord {

    I am embarrassed to admit this, but I am completely lost on the last question.. I have no clue wether it is a convenience for development or a dependancy, as I have not learned those terms or distinctions yet. For now I copied the ProductRecord file into my new project folder and renamed it's project line to match the new project name. However, while that eliminated the package does not exist error, and netbeans reports no errors now, when I run the program it does not write the new files. I have made some modifications to the code tryiing to get it to write properly but so far no luck in makingit work. Here is the current version of the file not running right.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package michaelchristopherp4db2;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.lang.IllegalStateException;
    import java.lang.SecurityException;
    import java.util.NoSuchElementException;
    import java.util.Formatter;
    import java.util.FormatterClosedException;
    import java.util.Scanner;
    /*  @author
    *   Michael Christopher
    *   IT215-1004D-03
    *   December 30, 2010
    *   Phase 4 DB 2
    public class readTxt
        private Scanner txtfile;
        private Formatter wishList;
        private Formatter giftIdeas;
        private Formatter priceError;
        //let user open file
        public void openFile()
        {//open method openFile
            try
            {//open try block
                priceError = new Formatter("priceerror.txt");//open object for items with invalid prices
                giftIdeas = new Formatter("giftideas.txt");//open object for gift ideas
                wishList = new Formatter("wishlist.txt");//open object for wish list
                txtfile = new Scanner(new File("products.txt"));//tell the compiler which file to use for input
            }//close try block
            catch (FileNotFoundException fileNotFoundException)
            {//open file not found catch block
                System.err.println("Error opening or creating file.");
                System.exit(1);
            }//close file not found catch block
            catch ( SecurityException securityException )
            {//start catch for SecurityException
                System.err.println("File Write access is denied.");
                System.exit(1);//END PROGRAM
            }//end catch
        }//close openFile method
        public void readProducts()
        {//open readProducts method
            ProductRecord product = new ProductRecord();//create object to hold read data
            //print headers for for output columns
            wishList.format("%-10s%-12s%10s\n", "Product ID", "Product Name", "Price");
            giftIdeas.format("%-10s%-12s%10s\n", "Product ID", "Product Name", "Price");
            priceError.format("%-10s%-12s%10s\n", "Product ID", "Product Name", "Price");
            try //read records from the file
            {//open try block
                while (txtfile.hasNext())
                {//open while
                    product.setproductID(txtfile.nextInt());//get productID
                    product.setproductName(txtfile.next());//get product name
                    product.setproductPrice(txtfile.nextDouble());//get product price
                    if (product.getproductPrice()>50.0)
                    {//open if to store items $50 or more to wishlist.txt
                        wishList.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close if $50 or greater
                    else if (product.getproductPrice()<0.0)
                    {//open if less than zero
                        priceError.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close if less than zero
                    else
                    {//open else for gift ideas from $0 to $50
                        giftIdeas.format("%-10d%-12s%10.2f\n", product.getproductID(),
                                product.getproductName(), product.getproductPrice());
                    }//close else for gift ideas
                }//close while
            }//close try block
            catch (NoSuchElementException elementException)
            {//open no such element exception catch
                System.err.println("File improperly formed.");
                txtfile.close();//close text file
                System.exit(1);
            }//close no such element exception catch
            catch (IllegalStateException stateException)
            {//open illegal state exception catch
                System.err.println("Error reading from file.");
                System.exit(1);
            }//close illegal state exception catch
        }//close readProducts method
        //close file and end application
        public void closeFile()
        {//open closeFile method
            if (txtfile != null)
                txtfile.close();//close file
        }//close closeFile method
    }//end application readTxtwith the System.out.printf lines in the ReadProducts method it would properly print to screen all of the elements in the products.txt file, it is not outputting to the other .txt files at all. I will be exploring the closeFile method in case the error is due to not closing all of the files in that method, but does anyone else see what might cause it not to output the data to the appropriate .txt files?

  • Package does not exist problem

    Hello everyone:
    I am a very new programmer student, and I'm having a problem I cannot seem to resolve. I am setting up a method for a JButton, and with the first inputs I'm getting a package does not exist error. Here is the code in question:
    private void placeOrderJButtonActionPerformed( ActionEvent event )
              double subtotal = 0.00;
              // calculate subtotal
              if ( hamburgerJRadioButton.isSelected() )
                   subtotal += 6.95;
              else if ( pizzaJRadioButton.isSelected() )
                   subtotal += 5.95;
              else
                   subtotal += 4.95;
              // declare display format
              DecimalFormat dollars = new DecimalFormat( "$0.00" );
              // display subtotal
              subtotalJTextField.setText( dollars.format( subtotal ) );
    It is coming back with these errors:
    C:\Users\Brian\Desktop\LunchOrderForm.java:255: <identifier> expected
              subtotalJTextField.setText( dollars.format( subtotal ) );
    ^
    C:\Users\Brian\Desktop\LunchOrderForm.java:255: package subtotalJTextField does not exist
              subtotalJTextField.setText( dollars.format( subtotal ) );
    I declared subtotalJTextField as an instance variable, but I'm not sure what its telling me here. Could anyone help?

    When you post code, click on the "code" label and paste the code between the code tags.
    rnashting wrote:
              // display subtotal
              subtotalJTextField.setText( dollars.format( subtotal ) );
    It is coming back with these errors:
    C:\Users\Brian\Desktop\LunchOrderForm.java:255: <identifier> expected
              subtotalJTextField.setText( dollars.format( subtotal ) );
    ^It appears that the line with the error is not inside a method. Java does not allow you to write code like this outside a method (or an initializer block).
    C:\Users\Brian\Desktop\LunchOrderForm.java:255: package subtotalJTextField does not exist
              subtotalJTextField.setText( dollars.format( subtotal ) );
    I declared subtotalJTextField as an instance variable, but I'm not sure what its telling me here. Could anyone help?I can't tell from the code you posted where this problem is. You most likely have not declared subtotJTextField correctly.

  • 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.

  • Weird.. package does not exist

    I know this is a common question and i searched the forum but nothing there is what I need.
    First of all I have the 'main' source file under a directory: d:\Model1_SecurityService\
    There is a subdirectory securityservice, under which there are several other directories according to the packages I have.
    Another directory I have is: d:\Model1_Classes
    When I compile the main program from d:\Model1_SecurityService> typing the following: javac -d d:\Model1_Classes testmain.java
    When I do this, i get an error message saying package does not exist for each package I import in the main file.
    My classpath has d:\Model1_Classes in it and my path has .; etc.
    Anyone know what the problem is?
    Everything used to work but i continued working on another computer and after copying these changes to this one, i'm getting these errors...

    So, for example if you had a class Baz in package
    com.foo.bar and you're using d:\Model1_Classes as your
    root directory for your compiled code, then there
    should be a directory structure
    d:\Model1_Classes\com\foo\bar
    which contains the compiled class Baz.class. Is this
    what you have?yes
    I found the problem though, apperently i need . in my classpath as well; don't know why actually, but it works now.
    thanks for wanting to help though

Maybe you are looking for

  • Printing problems with my HP Laser jet M 1217 nfw MFP

    Hello We just changed internet providers and now the printer will not print with our laptops.  We had no problems before and the 1217 is still the default printer.  The laptops are connecting fine but when we try to print we get an "error " message M

  • Enable and Disable the file paths

    Hai i have two file paths one logical file path and other is physical file path. I took two radio buttons. How can i enable and disable the file paths by using these radio buttons. When i select the 1st radio button then 1st file path is in enable an

  • Muvo TX FM weird connection prob

    Hy everybody! Im from Germany, but bought my MUVO 256 TX FM over the internet about a year ago, and it worked quite well all this time, untill last week! The weird thing is that the player works just fine, I can listen to the music already stored ins

  • Preload to Memory ( is that even possible )  ?

       So I noticed with the app I am working on.  There are some stutters the first time a section animates on the stage.  Once its been seen on the stage is performs great for the duration of the session.      is there a way to preload all these moviec

  • Content erased from ipod by error

    I had my son't ipod hooked to the computer and it came up with your ipod is synced with another library- go you want to erase.... I didn't want to erase and I clicked cancel but somehow it all erased.  Any suggestions on how to get it back?