Issue with - "cannot find symbol - variable JOptionPane"

need some help, got the below loop and want it to be able to loop by the number input by the input dialog. when i compile it i get an error in BlueJ. the error is "cannot find symbol - variable JOptionPane". Any help. have tried a few things however cannot get this to work at all. any suggestions?
public void numberLoop()
String qA = JOptionPane.showInputDialog(null,"How many times should this be completed (e.g. 1,2,3,4)?","Question",JOptionPane.QUESTION_MESSAGE);
int qA2 = Integer.parseInt(qA);
for (int startNum = 1; startNum <= qA2; startNum++)
System.out.println(startNum + " squared is " + (startNum * startNum));
}

never mind i fixed it. forgot the below.
import javax.swing.JOptionPane;
LOL

Similar Messages

  • The cannot find symbol - variable..... error

    i am recieving the "cannot find symbol variable getResident" error with the following line of code:
    if (Client.getResident=true)
    System.out.printf("Your Medicare Levy Contribution is: $%.2f %n", Client.getMedicare());
    i cant figure out why, maybe someone else may know and be able to help, i know that with int or double type methods u put parenthesis at the end of the method name, such as;
    while((Client.getGrossSalary())<=0)
    but i tried that here and it didnt change anything except the errror message.
    i have also tried putting parenthesis around the client.getResident, this didnt work either. i checked and made sure that the getResident method DOES in fact exist also.
    cheers for any help

    I have tried the following:
    if (Client.getResident()=true)
    if ((Client.getResident=true))
    if ((Client.getResident=(true)))
    if ((Client.getResident(true)))
    and none of these work, most of these alternatives return the error: unexpected type (Resident variable is boolean)

  • E.getSource()         cannot find symbol - variable e

    I'm currently developing a program for course I'm in that needs to allow a user to open a file, scan the information out of it and display the results.
    I'm currently stuck on an error that's really confused me. On the line: if (e.getSource() == readButton) { 
    the compiler displays the following <cannot find symbol - variable e>.
    If anyone could advise me as to my mistake I'd be very happy.
       public void readData(){
        this.textArea.setText(""); // clear the text area, ready to append new strings.
        fc = new JFileChooser();
               File file = null;
               FileReader reader = null;
               if (e.getSource() == readButton) {
                int rValue = fc.showOpenDialog(Plotter.this);
                if (rValue == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    reader = new FileReader(file);
                    log.append("Opening: " + file.getName() + "." + newline);
                else {
                    log.append("Open cancelled by user." + newline);
                log.setCaretPosition(log.getDocument().getLength());
                Scanner input = new Scanner(file);
                while (input.hasNextLine()){
             input.close();
        }

    scphan wrote:
    I guess you probably didn't see the post previous to yours ;). Just 2 minutes difference;Yes I did read that post. That is what prompted me to say I think they are doing it wrong. OP suggested that the readData method needed the ActionEvent to be passed as a parameter. Whereas I believe the actionPerformed method should be handle the event and the readData method should do just that: read data.
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == readButton) {
            readData();
    private void readData() {
        // method just reads the file
        // no need to handle event here
    }

  • 5 Errors Left: "Cannot find symbol variable "

    I think I have almost completed my error fixing but I cannot seem to figure out how to fix these last few errors I have.
    Here are my errors:
    --------------------Configuration: MadrigalRPA6 - JDK version 1.6.0_02 <Default> - <Default>--------------------
    E:\MadrigalR\MadrigalRPA6\src\MadrigalRPA6.java:113: cannot find symbol
    symbol : variable size
    location: class ServicesArray
    servicesArray = new PetService[size];
    ^
    E:\MadrigalR\MadrigalRPA6\src\MadrigalRPA6.java:115: cannot find symbol
    symbol : variable io
    location: class ServicesArray
    int size = io.readInt("How many services do you have to enter?");
    ^
    E:\MadrigalR\MadrigalRPA6\src\MadrigalRPA6.java:123: cannot find symbol
    symbol : variable number
    location: class ServicesArray
    for(int i = 0; i < number; ++i)
    ^
    E:\MadrigalR\MadrigalRPA6\src\MadrigalRPA6.java:135: cannot find symbol
    symbol : variable number
    location: class ServicesArray
    for(int i = 0; i < number; ++i)
    ^
    E:\MadrigalR\MadrigalRPA6\src\MadrigalRPA6.java:144: cannot find symbol
    symbol : variable io
    location: class ServicesArray
    io.writeInfo(info);
    ^
    5 errors
    Process completed.
    * @(#)MadrigalRPA6.java
    * MadrigalRPA6 application
    * @author
    * @version 1.00 2007/11/5
    *     Program Purpose: This program is designed to store available services for
    *  Dr. Doolittle's Mobile Pet Clinic.
    import staugIO.StaugIO;
    //DECLARE PET SERVICES CLASS
    class PetService
    private String ServiceCode = " ";
    private String ServiceName = " ";
    private String ServiceDescription = " ";
    private String ServiceType = " ";
    private double price = 0.00;
    private StaugIO io = new StaugIO();
    //CONSTRUCTOR
    public PetService()
    //END CONSTRUCTOR
    //SET PET SERVICES NAME
    public void setServiceCode()
         ServiceCode = io.readString("Enter the service code");
    }//END setServiceCode()
    //SET SERVICE NAME
    public void setServiceName()
         ServiceName = io.readString("Enter the service name");
    }//END setServiceName()
    //SET SERVICE DESCRIPTION
    public void setServiceDescription()
         ServiceDescription = io.readString("Enter the service description");
    }//END setServiceDescription
    //SET SERVICE TYPE
    public void setServiceType()
         ServiceType = io.readString("Enter the service type");
    }//END setServiceType()
    //SET SERVICE PRICE
    public void setPrice()
         price = io.readDouble("Enter the service price");
    }//END setPrice()
    //GET PET SERVICE NAME
    public String getServiceCode()
         return ServiceCode;
    }//END getServiceCode()
    //GET SERVICE NAME
    public String getServiceName()
         return ServiceName;
    }//END getServiceName()
    //GET SERVICE DESCRIPTION
    public String getServiceDescription()
         return ServiceDescription;
    }//END getServiceDescription
    //GET SERVICE TYPE
    public String getServiceType()
         return ServiceType;
    }//END getServiceType
    //GET SERVICE PRICE
    public double getPrice()
         return price;
    }//END getPrice
    }//END PetService CLASS
    class ServicesArray
         PetService[] servicesArray;  // Code the reference to the null array.
    //CONSTRUCTOR
    public ServicesArray()
    //END CONSTRUCTOR     
    public void getSize()
         servicesArray = new PetService[size];     *////////ERROR HERE*
    //READ NUMBER OF SERVICES TO STORE
    int size = io.readInt("How many services do you have to enter?"); *///////ERROR HERE TOO*
    //DYNAMICALLY DEFINE ARRAY OF PET SERVICE OBJECTS
    PetService services[] = new PetService[size];
    //DEFINE PET SERVICE OBJECTS AND FILL ARRAY OF OBJECTS WITH PET SERVICE DATA
    for(int i = 0; i < number; ++i) */////////////ERROR HERE ASWELL*
    services[i] = new PetService();
    services.setServiceCode();
    services[i].setServiceName();
    services[i].setServiceDescription();
    services[i].setServiceType();
    services[i].setPrice();
    }//END FOR
    //BUILD OUTPUT STRING FROM ARRAY OF PET SERVICE OBJECTS
    //AND DISPLAY PET SERVICES ONE AT A TIME
    for(int i = 0; i < number; ++i) *////////HMM WOW THIS DOESN'T SURPRISE ME THAT I HAVE ANOTHER ERROR*
         String info = "PET SERVICE " + (i+1) + " DATA\n";
              info += "\nSERVICE CODE: " + services[i].getServiceCode() + "\n"
                   + "SERVICE: " + services[i].getServiceName() + "\n"
                   + "DESC: " + services[i].getServiceDescription() + "\n"
                   + "TYPE: " + services[i].getServiceType() + "\n"
                   + "PRICE: " + services[i].getPrice() + "\n";
    //DISPLAY PET SERVICE DATA
         io.writeInfo(info); *////////////ERROR HERE AS WELL*
    }//END FOR
    }//END getSize()
    }//END ServicesArray CLASS
    public class MadrigalRPA6
    public static void main(String[]args)
    PetService service = new PetService();
    }//END main()
    }//END MADRIGALRPA6 CLASS

    wow i simply added the
    private StaugIO io = new StaugIO();
    into my ServicesArray class and i got the process completed with no errors, thats awesome but what doesnt make sense is this summary of this assignment that i have:
    Code a program that will store available services for Dr. Doolittle's Mobile Pet Clinic. Let the user determine the size of the array. Once the array has been populated with service information, display the contents of the array one at a time in separate GUI windows. Screen capture your output to a Word file and submit it with everything else. Use the code on pp 365-367 in the textbook to help you. Assume that the spacing is always double after a period and colon. You may limit your array size to no more than 3 as indicated by the sample output below. Use the sample output to test your array.
    PET SERVICE NO. 1
    SERVICE CODE: DG-2478
    SERVICE: Dog Group I
    DESC: DHLPP, Corona, Bordetella, Rabies
    TYPE: Vaccine
    PRICE: $47.50
    PET SERVICE NO. 2
    SERVICE CODE: FL-3182
    SERVICE: Feline Group I
    DESC: FVRCP, FeLV, Rabies
    TYPE: Vaccine
    PRICE: $46.50
    PET SERVICE NO. 3
    SERVICE CODE: DG-4682
    SERVICE: Dog Spay
    DESC: Abdominal surgery to remove the ovaries and/or uterus
    (ovariohysterectomy).
    TYPE: Surgery
    PRICE: $57.50
    No where in my code do i even have any of this so how would the user be able to see this? Is this program designed to just display the SERVICE CODE: and then the user types in the DG-4682? etc etc..
    I ask this because I cannot view my dialog boxes because when I run the program i get nothing, just process completed, nothing else.

  • Error: Cannot find symbol: Variable Name

    Hi Guys,
    I'm having some trouble with a piece of code. The error that I'm getting is:
    program.java:17: cannot find symbol
    symbol : variable name
    location: class program
    name.CTI(names[0].charAt(0));
    ^
    My Code is shown here:
    import java.io.*;
    import java.lang.*;
    class program{
         public static void main(String[] args){
              String names [] = {"brian", "stu", "mouse"};
              program name = new program ();
              name.sortArrayStr(names);
              //name.CTI(names[0].charAt(0));
         public void sortArrayStr( String[] names ){
              name.CTI(names[0].charAt(0));
         public int CTI ( char letter ){
              char c = letter;
            int k = (int) c;
            System.out.println("ASCII  = "  + k + ".");
              return k;
    }What I'm trying to do is get the name.CTI method caled from within sortArrayStr. When i call name.CTI from main it works fine, (commented part) but when i try from sortArrayStr I get this problem.
    Anyone have any ideas?
    Many Thanks

    Variable name is a local variable defined in method main, so it can not be referenced by writing name in another method like sortArrayStr.
    The good news is, if you want to call CTI from sortArrayStr, just do it:
    public void sortArrayStr( String[] names ){
        CTI(names[0].charAt(0));
    }

  • Help with 'cannot find symbol' error

    Ive written the following code. It is an excerpt from my entire class.
    When I try to compile the code I get the error:-
    cannot find symbol
    Symbol: variable playerRun1
    location: this class
    public void analysePlayerMove()
              if (playerGo == true)
                   if (playerMove.getComponentCount() == 0)
                        JOptionPane.showMessageDialog(this, "You Have Not Made A Move", "Empty Move", JOptionPane.ERROR_MESSAGE);
                   else
                        if (areTherePickUps == false)
                             for (int j=0; j<playerMove.getComponentCount(); j++)
                                  //reversing the players hand, because what is displayed on the GUI is reversed
                                  Component[] playerRun = playerMove.getComponentsInLayer(playerMove.DEFAULT_LAYER);
                                  Component[] playerRun1 = new Component[playerRun.length];
                                  int reverse = playerRun.length-1;
                                  for (int k=0; k<playerRun.length; k++)
                                       playerRun1[k] = playerRun[reverse];
                                       reverse--;
                             if (acePlayed == true && playerRun1.length == 1)
                                  if (playerRun1[0] != acePlayedSuit)
                                       JOptionPane.showMessageDialog(this, "Your Move Is Not Valid", "Invalid Move", JOptionPane.ERROR_MESSAGE);
                                  else
                                       //remove the cards from the players move hand and add them to the bottom of the shredded deck
         }I dont understand why I am getting this error, I clearly define the variable.

    Yes, but the variable is declared inside a block and so it's local to that block. You can't use it outside its scope, which is the block in which you declared it. Re-read the section of your book about variable scope.

  • Cannot find  symbol  : variable componentFactory

    after successfully creating webservice model  when i build my webdynpro dc i got error that "typeRegistry" cannot be resolved
    i sending my error log below. How to solve this problem?
    Mar 28, 2008 11:14:29 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] ERROR: Test: Build failed for asianpaints.com/Test(asianpaints.com_TRY0802SC_1) in variant "default":
    Build log -
    Development Component Build (2008-03-28 11:14:24)
      Component name: Test
      Component vendor: asianpaints.com
      SC compartment: asianpaints.com_TRY0802SC_1
      Configuration: J2E_TEST1402_D
      Location: J2E_TEST1402_D
      Source code location: http://172.25.10.210:50000/dtr/ws/TEST1402/asianpaints.com_TRY0802SC/dev/inactive/DCs/asianpaints.com/Test/_comp/
      DC root folder: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\
      DC type: Web Dynpro
      Host: RaviShankar
    DC Model check:
              [dcmake] All used DCs are available locally
              [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/webDynpro"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/cmi"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/ddic/ddicruntime"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/ddic/metamodel/content"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/wd/webdynpro"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/logging"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/tc/wdp/metamodel/content"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/com.sap.aii.proxy.framework"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/com.sap.aii.util.misc"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/com.sap.exception"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/com.sap.mw.jco"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/mail"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/IAIKSecurity"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/activation"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/webservices"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/webservices_lib"
              [dcmake] validating dependency to  public part "default" of DC "sap.com/sapxmltoolkit"
              [dcmake] DC model check OK
    Start build plugin:
              [dcmake] using build plugin: sap.com/tc/bi/bp/webDynpro
              [dcmake] starting build plugin from : C:\Documents and Settings\RaviShankar\.dtc\0\DCs\sap.com\tc\bi\bp\webDynpro\_comp\gen\default\public\webDynpro\
    Build Plugins Version 6.40.0.111  (WebDynproPlugin, 630_VAL_REL ) from 2005-09-08 23:39:44 CEST
    Building development component 'Test', vendor 'asianpaints.com', type 'Web Dynpro'
             software component 'TRY0802SC', vendor 'asianpaints.com'.
             location 'J2E_TEST1402_D'.
             source code location 'http://172.25.10.210:50000/dtr/ws/TEST1402/asianpaints.com_TRY0802SC/dev/inactive/'.
    General options:
    convert *.xlf to *.properties: yes
    include sources for debugging: yes
    Reading BuildInfrastructure extension from DC tc/bi/wdtech (vendor sap.com)
    Reading BuildInfrastructure extension from DC tc/bi/ddictech (vendor sap.com)
    Reading BuildInfrastructure extension from DC tc/bi/javatech (vendor sap.com)
    Reading BuildInfrastructure extension from DC tc/bi/util (vendor sap.com)
    Added technology 'sap.com/tc/bi/core'
    Added technology 'sap.com/tc/bi/javatech'
    Added technology 'sap.com/tc/bi/ddictech'
    Added technology 'sap.com/tc/bi/wdtech'
    Preparing data context..
    Warning: No 'default' JDK_HOME_PATH defined, will use running VM. Please update your configuration.
    Data context prepared in 0.171 seconds
    Executing macro file..
      Using macro file:     C:\Documents and Settings\RaviShankar\.dtc\0\DCs\sap.com\tc\bi\bp\webDynpro\_comp\gen\default\public\webDynpro\macros\build.vm
      Creating output file: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\gen\default\logs\build.xml
    Macro file executed in 0.125 seconds
    Starting Ant with build file: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\gen\default\logs\build.xml
    Using temporary directory:    C:\Documents and Settings\RaviShankar\.dtc\0\t\4AA094DB605D8518AA45B40C0795DC90
    Using build target: build
    Ant build started at 2008-03-28 11:14:25 GMT-08:00 (PST)
    Using Ant version 1.5.4
    prepare:
         [mkdir] Created dir: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\gen\default\deploy
    gen:
         [ddgen]
         [ddgen] [Info]    Property deployment is true: Deployment information is provided!
         [ddgen] [Info]    Property sourcepath: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages
         [ddgen] [Info]    Property targetpath: C:\Documents and Settings\RaviShankar\.dtc\0\t\4AA094DB605D8518AA45B40C0795DC90/gdd
         [ddgen] [Info]    Property archivename: asianpaints.com~Test
         [ddgen] [Info]    Property vendor: asianpaints.com
         [ddgen] [Info]    Property dcname: Test
         [ddgen] [Info]    Property language: Available languages are automatically determined!
         [ddgen] [Info]    Property addpaths ...
         [ddgen] [Info]       SapMetamodelDictionaryContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extmm/_comp/gen/default/public/def/lib/model
         [ddgen] [Info]       SapMetamodelWebdynproContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extmm/_comp/gen/default/public/def/lib/model
         [ddgen] [Info]    Initialize generation templates from configuration jar:file:/C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extddic/_comp/gen/default/public/def/lib/java/SapDictionaryGenerationCore.jar!/DictionaryGenerationConfigurationCompiled.xml
         [ddgen] [Info]    Generating dbtables/sdmDeployDd.xml
         [ddgen] [Info]    Generation finished (0 seconds)
         [ddgen]
         [timer] Data dictionary generator finished in 0.344 seconds
         [wdgen]
         [wdgen] [Info]    Property deployment is true: Deployment information is provided!
         [wdgen] [Info]    Property sourcepath: C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages
         [wdgen] [Info]    Property targetpath: C:\Documents and Settings\RaviShankar\.dtc\0\t\4AA094DB605D8518AA45B40C0795DC90/gwd
         [wdgen] [Info]    Property archivename: asianpaints.com~Test
         [wdgen] [Info]    Property vendor: asianpaints.com
         [wdgen] [Info]    Property dcname: Test
         [wdgen] [Info]    Property language: Available languages are automatically determined!
         [wdgen] [Info]    Property addpaths ...
         [wdgen] [Info]       SapMetamodelDictionaryContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extmm/_comp/gen/default/public/def/lib/model
         [wdgen] [Info]       SapMetamodelWebdynproContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extmm/_comp/gen/default/public/def/lib/model
         [wdgen] [Info]       SapMetamodelWebdynproContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/wdp/metamodel/content/_comp/gen/default/public/default/lib/java
         [wdgen] [Info]       SapMetamodelDictionaryContent.zip - C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/ddic/metamodel/content/_comp/gen/default/public/default/lib/java
         [wdgen] [Info]    Initialize generation templates from configuration jar:file:/C:/Documents and Settings/RaviShankar/.dtc/0/DCs/sap.com/tc/bi/extwd/_comp/gen/default/public/def/lib/java/SapWebDynproGenerationCore.jar!/WebDynproGenerationConfigurationCompiled.xml
         [wdgen] [Info]    com.apl.test.TestView --> TextView DefaultTextView: UIElement does not have a label
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPrivateTestView.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestView.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/InternalTestView.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPublicTestComp.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPrivateTestComp.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestComp.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/InternalTestComp.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPublicTestCompInterfaceView.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPrivateTestCompInterfaceView.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestCompInterfaceView.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/InternalTestCompInterfaceView.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPublicTestCompInterfaceCfg.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IExternalTestCompInterfaceCfg.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPrivateTestCompInterfaceCfg.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestCompInterfaceCfg.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/InternalTestCompInterfaceCfg.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestCompInterfaceCfg.wdcontroller
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPublicTestCompInterface.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IExternalTestCompInterface.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IPrivateTestCompInterface.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestCompInterface.java
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/InternalTestCompInterface.java
         [wdgen] [Info]    Generating packages/com/apl/test/TestCompInterface.wdcontroller
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/IMessageTestComp.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/TestModel.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getbyname.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_gettwodept.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_adddeptDTO.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_adddeptDTO
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=depdet
           [Ant] getParameterStringForWSInvoke:result=this.depdet.getOriginalBean()
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getdeptDTO.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getdeptDTO
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empid
           [Ant] getParameterStringForWSInvoke:result=this.empid
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_addempDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_gettwodept.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_gettwodept
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=d1,d2
           [Ant] getParameterStringForWSInvoke:result=this.d1, this.d2
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getdeptDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/ComplexType_EmpdetDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getReg.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getReg
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=regid
           [Ant] getParameterStringForWSInvoke:result=this.regid
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getbyname.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getbyname
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=name
           [Ant] getParameterStringForWSInvoke:result=this.name
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getbetsal.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_addempDTO.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_addempDTO
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empdet
           [Ant] getParameterStringForWSInvoke:result=this.empdet.getOriginalBean()
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getempdetdeptDTO.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getempdetdeptDTO
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empid,name,age,salary,address,empdept
           [Ant] getParameterStringForWSInvoke:result=this.empid, this.name, this.age, this.salary, this.address, this.empdept.getOriginalBean()
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getbetsal.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getbetsal
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=sal1,sal2
           [Ant] getParameterStringForWSInvoke:result=this.sal1, this.sal2
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getempDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getdept2.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_adddeptDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getsalary.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getReg.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getdept0.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getdept0
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empid
           [Ant] getParameterStringForWSInvoke:result=this.empid
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/ComplexType_EmpdetdeptDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_addemp0.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_addemp0
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empid,name,age,salary,address
           [Ant] getParameterStringForWSInvoke:result=this.empid, this.name, this.age, this.salary, this.address
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getdeptwise.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getdeptwise.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getdeptwise
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=deptid
           [Ant] getParameterStringForWSInvoke:result=this.deptid
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_getempdetdeptDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Response_HaiViDocument_addemp1.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getempDTO.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getempDTO
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=empid
           [Ant] getParameterStringForWSInvoke:result=this.empid
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/ComplexType_EmpdeptDTO.java
         [wdgen] [Info]    Generating packages/com/apl/test/model/testmodel/Request_HaiViDocument_getsalary.java
           [Ant] getParameterStringForWSInvoke:modelclassname=Request_HaiViDocument_getsalary
           [Ant] getParameterStringForWSInvoke:modeltype=Request
           [Ant] getParameterStringForWSInvoke:modeltype=salary
           [Ant] getParameterStringForWSInvoke:result=this.salary
         [wdgen] [Info]    Generating configuration/Components/com.apl.test.TestComp/TestComp.xml
         [wdgen] [Info]    Generating packages/com/apl/test/wdp/ResourceTestComp.properties
         [wdgen] [Info]    Generating portalapp.xml
         [wdgen] [Info]    Generating wd.xml
         [wdgen] [Info]    Generating application.xml
         [wdgen] [Info]    Generating application-j2ee-engine.xml
         [wdgen] [Info]    Generating PublicPartFileList.properties
         [wdgen] [Info]    Generating PublicPartFileList.xml
         [wdgen] [Info]    Generation finished (0 seconds)
         [wdgen]
         [timer] WebDynpro generator finished in 0.953 seconds
         [mkdir] Created dir: C:\Documents and Settings\RaviShankar\.dtc\0\t\4AA094DB605D8518AA45B40C0795DC90\classes
         [javac] Compiling 88 source files to C:\Documents and Settings\RaviShankar\.dtc\0\t\4AA094DB605D8518AA45B40C0795DC90\classes
    C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages\com\apl\test\model\testmodel\proxies\HaiImpl.java:12: cannot find symbol
    symbol  : variable _typeRegistry
    location: class com.apl.test.model.testmodel.proxies.HaiImpl
        this._typeRegistry = new com.sap.engine.services.webservices.jaxrpc.encoding.TypeMappingRegistryImpl();
            ^
    C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages\com\apl\test\model\testmodel\proxies\HaiImpl.java:13: cannot find symbol
    symbol  : variable _typeRegistry
    location: class com.apl.test.model.testmodel.proxies.HaiImpl
        this._typeRegistry.fromXML(this.getClass().getClassLoader().getResourceAsStream("com/apl/test/model/testmodel/proxies/types.xml"),this.getClass().getClassLoader());
            ^
    C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages\com\apl\test\model\testmodel\proxies\HaiImpl.java:18: cannot find symbol
    symbol  : variable componentFactory
    location: class com.apl.test.model.testmodel.proxies.HaiImpl
        this.componentFactory = componentFactory;
            ^
    C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages\com\apl\test\model\testmodel\proxies\HaiImpl.java:20: cannot find symbol
    symbol  : variable _typeRegistry
    location: class com.apl.test.model.testmodel.proxies.HaiImpl
        this._typeRegistry = new com.sap.engine.services.webservices.jaxrpc.encoding.TypeMappingRegistryImpl();
            ^
    C:\Documents and Settings\RaviShankar\.dtc\0\DCs\asianpaints.com\Test\_comp\src\packages\com\apl\test\model\testmodel\proxies\HaiImpl.java:21: cannot find symbol
    symbol  : variable _typeRegistry
    location: class com.apl.test.model.testmodel.proxies.HaiImpl
        this._typeRegistry.fromXML(this.getClass().getClassLoader().getResourceAsStream("com/apl/test/model/testmodel/proxies/types.xml"),this.getClass().getClassLoader());
            ^
    5 errors
    Ant build finished with ERRORS
    file:C:/Documents and Settings/RaviShankar/.dtc/0/DCs/asianpaints.com/Test/_comp/gen/default/logs/build.xml:137: Compile failed; see the compiler error output for details.
    Ant build finished at 2008-03-28 11:14:29 GMT-08:00 (PST), Duration: 3 seconds
    Build finished with ERROR
    Cleaning up.

    Hi
        I tried that but still i'm getting the same error
    I have also tried to create web service model for the same webservice in local web dynpro project there it got build and deployed succesfully and i'm getting this error only with DC project (Track)
    with regards
    Ravi shankar
    Edited by: Ravi Shankar on Mar 10, 2008 12:53 PM

  • Please help with cannot find symbol error. Been struggling all day :(

    Hi all. :)
    Writing a game for my phone with KToolbar and have been getting a cannot find symbol error for every variable and method I try to use across Classes. I've looked all over and though it seems a common problem I always either don't understand or can't get working the various solutions. Example of my errors:
    C:\...\BTK800i.java:197: cannot find symbol
    symbol : variable youSayWhat
    location: class HelloCanvas
              youSayWhat=key;
              ^
    If I try BTK800i.variable or BTK800i.message I get a new error.
    C:\...\src\BTK800i.java:184: non-static method newOrdersSarge() cannot be referenced from a static context
              BTK800i.newOrdersSarge();
              ^
    Both these errors apply to both variables and methods. It only happens when I'm using methods/variables of one class in another, am I using public and private incorrectly? It doesn't seem to make a difference if I make variables public or leave them private, I'm trying to get to them with a public method within a private class. Is it something else? I really have no idea. :(
    Here's my code, it's long enough to be a tiresome read so I've tried to skip what I know isn't relevant.
    public class BTK800i extends MIDlet {
         private Display myDisplay;
         private HelloCanvas myCanvas;
         public int youSayWhat;
            //a whole bunch more skipped here, but I'm fairly certain it's not anything that'll help find a solution
         public BTK800i() {
              paused=false;
    public void startApp() throws MIDletStateChangeException {
              if( paused ) {
                   myCanvas.repaint();
              else {
                   myDisplay=Display.getDisplay(this);
                   myCanvas=new HelloCanvas();
                   myDisplay.setCurrent(myCanvas);
                   myCanvas.setFullScreenMode(true);
                   youSayWhat=0;
                           //again with the skipping, more code not related
    public void newOrdersSarge() {
    //whole bunch of code
    //other methods skipped
    class HelloCanvas extends Canvas {
         public void keyPressed (int key) {
              youSayWhat=key;
              repaint ();
    //skippage
    }The stuff I skipped is mainly either more of the same sorta thing or maths/writing to screen stuff.
    Thanks alot to anyone who helps. I'm really struggling with this. :(
    Dan.

    But I have been reading them :(
    My next-door neighbour unfortunately is an 80-something married man, but I will go have a looksie about static and instances.
    I thought the point of public variables was that other classes could use them, is this wrong?
    Also does this mean that to use the variables from my BTK class in the HelloCanvas class I need to first instantiate BTK? I don't understand how that works as the code starts running from the BTK class in the first place :S I guess more reading will help with this.
    Thanks very much for replying. :)
    Edit:
    OK I have read up on it but I don't think I found anything I hadn't read before. I tried to make a new class which I could instantiate to hold all the variables and methods I wanted everything to be able to access, but that went disastrously. Am I right in understanding that there are no global variables in Java? :s
    Edited by: Dan69 on Apr 17, 2010 1:15 PM

  • Having issues with "cannot find" and/or "taking too ling to respond".

    I have good signal from my internet provider(broadband 3G service), but it seems like lately all I get is "Cannot find website" and/or "Taking too long to respond" errors.
    My internet provider has checked their cell towers, I even bought a new broadband card, I've done all the updates on the card, etc.
    Monitoring my card signal shows I have excellent service.
    Any suggestions????

    Make a "Genius" appointment at an Apple Store, or go to another authorized service provider. You may have to leave the machine there for several days.
    Back up all data on the internal drive(s) before you hand over your computer to anyone. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you have at least two complete, independent backups, and you know how to restore to an empty drive from any of them.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • Unable to compile, cannot find symbol - variable arg

    Hi, I'm new to Java. I have tried to compile the following code. but it won't work
    public class Testing
    public static void main(String[] args)
    int size = args.length;
    int largest = -9;
    for ( int i = 0; i<size; i++ )
    if ( arg[i] > largest )largest = arg;
    System.out.println("Largest is " +largest);
    I have tried adding int x = Integer.parseInt(args[i]);
    but the same error code...
    Could it be compiler problem?i'm using BlueJ.
    Thanks for helping...

    It is because you a comparin a String to an int. This won't work. You need to convert your String to and int.
    Take a look at this:
    public class Testing
        public static void main(String[] args)
                int size = args.length;
                int largest = -9;
                int value;
                for ( int i = 0; i<size; i++ )
                       value=Integer.parseInt(args); //converts the String to an int
    if ( value > largest )largest = value;
    System.out.println("Largest is " +largest);
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html
    You need to read the API to check what methods you can use. If you have a problem with say a Sting then google for "Java String API" and view the methods in the String class. You need to make yourself familiar with whats available.

  • Having trouble finding out why i get   "cannot find symbol variable textio"

    Im trying to write a romanNumeral converter program.
    I dont know what else im doing wrong!
    Please help me to see and understand what i did wrong!

    Please help me to see and understand what i did wrong!You are using something called 'textio'
    The compiler doesn't know what that is.
    It is telling you exactly that.

  • Cannot find symbol even though it's there.

    I am having an issue compiling a java class in oracle. I have a java class that will run an executable. I want to call that java class from a difference class and when I try to compile that class, it fails with Cannot Find Symbol.
    This is what errors, and it errocs when I declare ec as ExecCMD.
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "MS_FS_FUNCTIONS" AS
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.sql.*;
    import ms_fs_execcmd.ExecCMD.*;
    public class exportPDF
        public static String export_PDF(String p_pdf_contents)
            ExecCMD ec ;
           ec = new ExecCMD("ExportPDFData.exe");
            return "string";
    This is the class im trying to call.
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED MS_FS_EXECCMD AS
    package ms_fs_execcmd;
    import java.util.*;
    import java.io.*;
    public class ExecCMD
        public static void main(String args[])
            try
            {   if (args.length > 0 ){        
                    Runtime rt = Runtime.getRuntime();
                    Process proc = rt.exec(args[0]);
                    InputStream stderr = proc.getErrorStream();
                    InputStreamReader isr = new InputStreamReader(stderr);
                    BufferedReader br = new BufferedReader(isr);
                    String line = null;
                    System.out.println("<ERROR>");
                    while ( (line = br.readLine()) != null)
                    System.out.println(line);
                    System.out.println("</ERROR>");
                    int exitVal = proc.waitFor();
                    System.out.println("Process exitValue: " + exitVal);
            } catch (Throwable t)
                t.printStackTrace();
    here is the error message.
    [Error]  (0: 0): MS_FS_FUNCTIONS:11: cannot find symbol
    [Error]  (0: 0): symbol  : constructor ExecCMD(java.lang.String)
    [Error]  (0: 0): location: class ExecCMD
    [Error]  (0: 0):        ec = new ExecCMD("ExportPDFData.exe");
    [Error]  (0: 0):             ^
    [Error]  (0: 0): 1 error

    Bill,
    I'm having exactly the same problem with trying to install Portal 4.0. Has
    anybody given you an answer to this problem?
    Thanks,
    Bill Goggin wrote:
    I recently moved my evaluation copy of WebLogic 6.1 SP 1 from /opt to
    /usr/local on my RedHat 7.1 box. WebLogic runs fine from the new
    location. However, when I try to install my evaluation copy of WLPortal
    4.0, it insists that WebLogic 6.1 SP 1 is not installed in my BEA_HOME,
    even though it is. I've uninstalled and re-installed WebLogic many
    times, but it still won't work. Does the uninstall miss some files? Has
    anyone else had this problem?

  • Need help with class info and cannot find symbol error.

    I having problems with a cannot find symbol error. I cant seem to figure it out.
    I have about 12 of them in a program I am trying to do. I was wondering if anyone could help me out?
    Here is some code I am working on:
    // This will test the invoice class application.
    // This program involves a hardware store's invoice.
    //import java.util.*;
    public class InvoiceTest
         public static void main( String args[] )
         Invoice invoice1 = new Invoice( "1234", "Hammer", 2, 14.95 );
    // display invoice1
         System.out.println("Original invoice information" );
         System.out.println("Part number: ", invoice1.getPartNumber() );
         System.out.println("Description: ", invoice1.getPartDescription() );
         System.out.println("Quantity: ", invoice1.getQuantity() );
         System.out.println("Price: ", invoice1.getPricePerItem() );
         System.out.println("Invoice amount: ", invoice1.getInvoiceAmount() );
    // change invoice1's data
         invoice1.setPartNumber( "001234" );
         invoice1.setPartDescription( "Yellow Hammer" );
         invoice1.setQuantity( 3 );
         invoice1.setPricePerItem( 19.49 );
    // display invoice1 with new data
         System.out.println("Updated invoice information" );
         System.out.println("Part number: ", invoice1.getPartNumber() );
         System.out.println("Description: ", invoice1.getPartDescription() );
         System.out.println("Quantity: ", invoice1.getQuantity() );
         System.out.println("Price: ", invoice1.getPricePerItem() );
         System.out.println("Invoice amount: ", invoice1.getInvoiceAmount() );
    and that uses this class file:
    public class Invoice
    private String partNumber;
    private String partDescription;
    private int quantityPurchased;
    private double pricePerItem;
         public Invoice( String ID, String desc, int purchased, double price )
              partNumber = ID;
         partDescription = desc;
         if ( purchased >= 0 )
         quantityPurchased = purchased;
         if ( price > 0 )
         pricePerItem = price;
    public double getInvoiceAmount()
         return quantityPurchased * pricePerItem;
    public void setPartNumber( String newNumber )
         partNumber = newNumber;
         System.out.println(partDescription+" has changed to part "+newNumber);
    public String getPartNumber()
         return partNumber;
    public void setDescription( String newDescription )
         System.out.printf("%s now refers to %s, not %s.\n",
    partNumber, newDescription, partDescription);
         partDescription = newDescription;
    public String getDescription()
         return partDescription;
    public void setPricePerItem( double newPrice )
         if ( newPrice > 0 )
    pricePerItem = newPrice;
    public double getPricePerItem()
    return pricePerItem;
    Any tips for helping me out?

    System.out.println("Part number:
    "+invoice1.getPartNumber;
    The + sign will concatenate invoice1.getPartNumber()
    after "Part number: " forming only one String.I added the plus sign and it gives me more errors:
    C:\>javac InvoiceTest.java
    InvoiceTest.java:16: operator + cannot be applied to java.lang.String
            System.out.println("Part number: ",   + invoice1.getPartNumber() );
                                                  ^
    InvoiceTest.java:17: cannot find symbol
    symbol  : method getPartDescription()
    location: class Invoice
            System.out.println("Description: ", + invoice1.getPartDescription() );
                                                          ^
    InvoiceTest.java:17: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Description: ", + invoice1.getPartDescription() );
                      ^
    InvoiceTest.java:18: cannot find symbol
    symbol  : method getQuantity()
    location: class Invoice
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                                                       ^
    InvoiceTest.java:18: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                      ^
    InvoiceTest.java:19: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Price: ", + invoice1.getPricePerItem() );
                      ^
    InvoiceTest.java:20: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Invoice amount: ", + invoice1.getInvoiceAmount() );
                      ^
    InvoiceTest.java:24: cannot find symbol
    symbol  : method setPartDescription(java.lang.String)
    location: class Invoice
            invoice1.setPartDescription( "Yellow Hammer" );
                    ^
    InvoiceTest.java:25: cannot find symbol
    symbol  : method setQuantity(int)
    location: class Invoice
            invoice1.setQuantity( 3 );
                    ^
    InvoiceTest.java:30: operator + cannot be applied to java.lang.String
            System.out.println("Part number: ", + invoice1.getPartNumber() );
                                                ^
    InvoiceTest.java:31: cannot find symbol
    symbol  : method getPartDescription()
    location: class Invoice
            System.out.println("Description: ", + invoice1.getPartDescription() );
                                                          ^
    InvoiceTest.java:31: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Description: ", + invoice1.getPartDescription() );
                      ^
    InvoiceTest.java:32: cannot find symbol
    symbol  : method getQuantity()
    location: class Invoice
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                                                       ^
    InvoiceTest.java:32: cannot find symbol
    symbol  : method println(java.lang.String,int)
    location: class java.io.PrintStream
            System.out.println("Quantity: ", + invoice1.getQuantity() );
                      ^
    InvoiceTest.java:33: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Price: ", + invoice1.getPricePerItem() );
                      ^
    InvoiceTest.java:34: cannot find symbol
    symbol  : method println(java.lang.String,double)
    location: class java.io.PrintStream
            System.out.println("Invoice amount: ", + invoice1.getInvoiceAmount() );
                      ^
    16 errors

  • Cannot find symbol error with ArrayList

    Hi friends,
    i am using ArrayList in the servlet file inorder to store the resultset retrieved from DB. When i compile my program i got a error like this one.
    C:\apache-tomcat-6.0.16\webapps\rmanew\WEB-INF\classes\com\rajk\javacode\servlet
    s>javac -classpath c:\apache-tomcat-6.0.16\lib\servlet-api.jar *.java
    RMAEntryModel.java:385: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("date"));
                       ^
    RMAEntryModel.java:386: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("serial_no"));
                       ^
    RMAEntryModel.java:387: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("replaced_serial_no"));
                       ^
    RMAEntryModel.java:388: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("customer_inv_no"));
                       ^
    RMAEntryModel.java:389: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("fault_desc"));
                       ^
    RMAEntryModel.java:390: cannot find symbol
    symbol  : method addElement(java.lang.Object)
    location: class java.util.ArrayList
                    pat.addElement(rs.getObject("vendor_name"));
                       ^
    RMAEntryModel.java:403: cannot find symbol
    symbol  : method elementAt(int)
    location: class java.util.ArrayList
                       everyPat.addElement(pat.elementAt(k));
                                              ^
    RMAEntryModel.java:406: cannot find symbol
    symbol  : method addElement(java.util.ArrayList)
    location: class java.util.ArrayList
                   all.addElement(everyPat);
                      ^
    8 errorsWhat is the problem?... Any help will be appreciated

    Read the message. It cannot find the addElement() method on class java.util.ArrayList.
    Just consult the javadoc of the class used for details about the class: [http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html].
    In the future, those kind of basic compilation errors (and runtime exceptions) rather belongs in the 'New to Java' forum. Those are really trival.

  • CANNOT FIND SYMBOL !! T.T

    i have trry reading th archive thread about this but i dont understand a word
    iam really new to java
    i have this problem
    symbol  : variable cirumference
    location: class CircleCirum
    *          cirumference = 2 * 3.14 * radius;*
    *          ^*
    C:\Documents and Settings\Administrator\Desktop\CircleCirum.java:27: cannot find symbol
    symbol  : variable cirumference
    location: class CircleCirum
    *          JOptionPane.showMessageDialog(null, "The Cirumference of the circle is " + cirumference + ".");*
    *          ^*
    *2 errors*
    Tool completed with exit code 1
    i uninstall and reinstal textpad to my C:/program files
    so what the first thing i have to do to make this work?

    hiddendragon wrote:
    public static void main(String[] args)
              String input;
              int radius, circumference;
    u mean this??Yes, but, it's hard to know how this relates to your problem without seeing compilable code. Your best bet here is not to show your whole program, but to condense your question/problem into a single small class that is compilable by any and all of us, and demonstrates your problem. In other words, a [Short, Self Contained, Correct (Compilable), Example or SSCCE|http://homepage1.nifty.com/algafield/sscce.html] .
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}good luck

Maybe you are looking for

  • How do I access camera raw from withing Lightroom

    Bear with me as I am new at this. I am trying lightroom and have read several reviews of 1.1 and Camera Raw 4.1. I read Martin Evening's update on 1.1 and he has a whole section on using CR to make adjustments to the raw file. I imported several raw

  • Restricted Backflush Authorisation Object C_BFLS_L  is NOT working!

    Hi, We are using the IS-MILL version of SAP 4.7. We are trying to restrict the authorisation of users for Tcode MFBF only to a few. As suggested in the SPRO help files we tried useing the 'Authorisation Object' [bC_BFLS_L]</b> Restricted Backflush bu

  • "Show All Windows" in Mission Control

    Hey everyone! In Snow Leopard you had this amazing feature that when you push and hold the mouse button on an active application in the dock, all the windows of that application would pop up beside each other. Doing so in Lion just generates a sub-me

  • 2 Engineer visits, switched off twice, now again n...

    I completed a house move 4 weeks ago, BT engineer arrived installed phone line and Infinity.  All working fine. 55mbs download speed.  I then received messages saying an engineer was due to visit, so called to say everything is working fine so no nee

  • Passing file path in function module XXL_FULL_API

    Hi All, I am using function module XXL_FULL_API instead of GUI_DOWNLOAD becuse  I need to download data with field names as heading. my question is how to pass complete file path (presentation server  path)in the function module XXL_FULL_API . Thanks