Errors in Fileconnection--pls help

hi guys
i need ur help,i am quite new to j2me and i encounter some errors that i couldnt solve.pls help
errors i encounter:
C:\WTK22\apps\TCPClient\src\TCPClient.java:88: cannot find symbol
symbol  : class FileConnection
location: class TCPClient
        FileConnection fileConnection = (FileConnection)Connector.open(filename, Connector.READ_WRITE);
        ^
C:\WTK22\apps\TCPClient\src\TCPClient.java:88: cannot find symbol
symbol  : class FileConnection
location: class TCPClient
        FileConnection fileConnection = (FileConnection)Connector.open(filename, Connector.READ_WRITE);
                                         ^
2 errorsi'm pasting some of my codes here.
String filename = "file:///root1/hello.txt";
byte[] data = "hello world".getBytes();
FileConnection fileConnection = (FileConnection)Connector.open(filename, Connector.READ_WRITE);
if( ! fileConnection.exists()){
fileConnection.create();
OutputStream outputStream = fileConnection.openOutputStream();
outputStream.write(data);
outputStream.close();
Message was edited by:
kenneth-rock

i have try importing :
import javax.microedition.io.file.*;
however when i compile the program, i will get a error message:
C:\WTK22\apps\TCPClient\src\TCPClient.java:5: package javax.microedition.io.file does not exist
import javax.microedition.io.file.*;and inclusive of the two compiler messages that i have post earlier on

Similar Messages

  • TS3694 I want to restore my iphone 3g but then it says error 1015..pls help me

    I want to restore my iphone 3g but then it says error 1015..pls help me

    Usually with that particular error you will find better answers on Google.

  • SLD error coming . Pls help

    In Design when I click Import Software Components version
    I get error
    Unable to read software component versions from System Landscape Directory "sapp06ci:50000"
    Pls help
    Regards

    Hello,
    The above RFC works well.
    But when i use sldcheck tx. i got this error message
    RFC ping was successful
    Calling function EXCHANGE_PROFILE_GET_PARAMETER
    Retrieving data from the XI Profile...
    Function call returned exception code     3
    Access to the XI Profile is currently disrupted.
    => Check whether you can access the XI Profile using a web browser!
    Pls suggest

  • HT1657 my rental download shows error. it happened once on my movie purchase, and twice on my season tv episode. this time it's a rented movie but i cant download it completely cus of the error... pls help

    my rental download shows error. it happened once on my movie purchase, and twice on my season tv episode. this time it's a rented movie but i cant download it completely cus of the error... pls help

    What does the error message say? (Include error message numbers if you're getting any, please.)

  • HT4623 I was updating my iPhone 4S when the internet got disconnected. By the time I get connected again it could not restore due to an unknown error code 1611, pls help

    was updating my iPhone 4S when the internet got disconnected. By the time I get connected again it could not restore due to an unknown error code 1611, pls help

    Try:
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    Or it could be an Apple problem and you will have to wait.

  • Error in Trigger - Pls Help~!

    Dear All
    I've written a Trigger but have encountered some error during compilation.
    Can someone help me out pls?
    This is some sample code that i have:
    declare
    dup_count2 char(4);
    begin
    when (p_order.ORD_STATUS = 5)
    if (dup_count2 <=0) then
    insert into partial_filled_trigger
              (TRADE_DT, REF_NO)
              VALUES (p_order.TRADE_DT, p_order.REF_NO)
                   ELSE
    UPDATE PARTIAL_FILLED_TRIGGER set
    TRADE_DT=p_order.TRADE_DT, REF_NO=p_order.REF_NO
              where REF_NO = p_order.REF_NO;     
                   END IF;
    END LOOP;
    COMMIT;
    END;      
    My error msg:
    "1 Error Text = OLS-00103: Encountered the symbol ..."
    it is referring to line 5 and 6 and 15 (hightlighted in bold)
    Kindly help~! Thank you.

    Please check the formatted code - i think will be easier to understand --
    CREATE OR REPLACE TRIGGER "ITRADESYS"."PARTIAL_FILLED_TRIGGER" AFTER INSERT OR
    UPDATE ON "ITRADESYS"."ORD_MST" FOR EACH ROW
    DECLARE dup_count2 CHAR(4);
    BEGIN
    WHEN(p_order.ord_status = 5) THEN
      IF(dup_count2 <= 0) THEN
        INSERT INTO partial_filled_trigger(trade_dt,  
                                           ref_no,  
                                           ord_no,  
                                           ord_seq_no,  
                                           cust_id,  
                                           acc_id,  
                                           cust_name,  
                                           ord_side,  
                                           xchg_id,  
                                           mkt_id,  
                                           symbol,  
                                           ord_pr,  
                                           stop_pr,  
                                           ord_qty,  
                                           filled_qty,  
                                           outstd_qty,  
                                           ord_type,  
                                           ord_term,  
                                           expiry_dt,  
                                           aon,  
                                           short_sell,  
                                           disposal_sale,  
                                           scrip,  
                                           odd_lot,  
                                           channel_id,  
                                           src_ref_no,  
                                           trader_id,  
                                           trader_tm,  
                                           terminal_id,  
                                           ams_id,  
                                           ams_tm,  
                                           approval_id,  
                                           approval_tm,  
                                           cancel_qty,  
                                           reduce_qty,  
                                           ord_status,  
                                           ACTION,  
                                           excpt_remark,  
                                           reason_code,  
                                           notify_flg,  
                                           notify_tm,  
                                           ord_task,  
                                           queue_tm,  
                                           ord_queued,  
                                           amend_from,  
                                           amend_to,  
                                           next_day,  
                                           group_id,  
                                           business_dt,  
                                           new_pr,  
                                           new_qty,  
                                           REMARK,
                                           BSK_FLG,
                                           BSK_PARENT,
                                           INDEX_CODE,
                                           AVG_FILLED_PR,
                                           OMNIBUSAC,
                                           CONTRA,
                                           SETT_TYPE,
                                           SETT_CCY,
                                           CHANNEL_REF_NO,
                                           DISCLOSED_QTY,
                                           MANUAL_TRADE,
                                           DIRECT_TRADE,
                                           COUNTERPARTY,
                                           ALERTFLG,ACKFLG)
          VALUES (p_order.TRADE_DT,
                  p_order.REF_NO,
                  p_order.ORD_NO,
                  p_order.ORD_SEQ_NO,
                  p_order.CUST_ID,
                  p_order.ACC_ID,
                  p_order.CUST_NAME,
                  p_order.ORD_SIDE,
                  p_order.XCHG_ID,
                  p_order.MKT_ID,
                  p_order.SYMBOL,
                  p_order.ORD_PR,
                  p_order.STOP_PR,
                  p_order.ORD_QTY,
                  p_order.FILLED_QTY,
                  p_order.OUTSTD_QTY,
                  p_order.ORD_TYPE,
                  p_order.ORD_TERM,
                  p_order.EXPIRY_DT,
                  p_order.AON,
                  p_order.SHORT_SELL,
                  p_order.DISPOSAL_SALE,
                  p_order.SCRIP,
                  p_order.ODD_LOT,
                  p_order.CHANNEL_ID,
                  p_order.SRC_REF_NO,
                  p_order.TRADER_ID,
                  p_order.TRADER_TM,
                  p_order.TERMINAL_ID,
                  p_order.AMS_ID,
                  p_order.AMS_TM,
                  p_order.APPROVAL_ID,
                  p_order.APPROVAL_TM,
                  p_order.CANCEL_QTY,
                  p_order.REDUCE_QTY,
                  p_order.ORD_STATUS,
                  p_order.ACTION,
                  p_order.EXCPT_REMARK,
                  p_order.REASON_CODE,
                  p_order.NOTIFY_FLG,
                  p_order.NOTIFY_TM,
                  p_order.ORD_TASK,
                  p_order.QUEUE_TM,
                  p_order.ORD_QUEUED,
                  p_order.AMEND_FROM,
                  p_order.AMEND_TO,
                  p_order.NEXT_DAY,
                  p_order.GROUP_ID,
                  p_order.BUSINESS_DT,
                  p_order.NEW_PR,
                  p_order.NEW_QTY,
                  p_order.REMARK,
                  p_order.BSK_FLG,
                  p_order.BSK_PARENT,
                  p_order.INDEX_CODE,
                  p_order.AVG_FILLED_PR,
                  p_order.OMNIBUSAC,
                  p_order.CONTRA,
                  p_order.SETT_TYPE,
                  p_order.SETT_CCY,
                  p_order.CHANNEL_REF_NO,
                  p_order.DISCLOSED_QTY,
                  p_order.MANUAL_TRADE,
                  p_order.DIRECT_TRADE,
                  p_order.COUNTERPARTY,
                  '0',
                  '0');
      ELSE
        UPDATE PARTIAL_FILLED_TRIGGER
        set TRADE_DT=p_order.TRADE_DT,
            REF_NO=p_order.REF_NO,
            ORD_NO=p_order.ORD_NO,
            ORD_SEQ_NO=p_order.ORD_SEQ_NO,
            CUST_ID= p_order.CUST_ID,
            ACC_ID= p_order.ACC_ID,
            CUST_NAME=p_order.CUST_NAME,
            ORD_SIDE=p_order.ORD_SIDE,
            XCHG_ID=p_order.XCHG_ID,
            MKT_ID=p_order.MKT_ID,
            SYMBOL=p_order.SYMBOL,
            ORD_PR=p_order.ORD_PR,
            STOP_PR=p_order.STOP_PR,
            ORD_QTY=p_order.ORD_QTY,
            FILLED_QTY=p_order.FILLED_QTY,
            OUTSTD_QTY=p_order.OUTSTD_QTY,
            ORD_TYPE=p_order.ORD_TYPE,
            ORD_TERM=p_order.ORD_TERM,
            EXPIRY_DT=p_order.EXPIRY_DT,
            AON=p_order.AON,
            SHORT_SELL=p_order.SHORT_SELL,
            DISPOSAL_SALE=p_order.DISPOSAL_SALE,
            SCRIP=p_order.SCRIP,
            ODD_LOT=p_order.ODD_LOT,
            CHANNEL_ID=p_order.CHANNEL_ID,
            SRC_REF_NO=p_order.SRC_REF_NO,
            TRADER_ID=p_order.TRADER_ID,
            TRADER_TM=p_order.TRADER_TM,
            TERMINAL_ID=p_order.TERMINAL_ID,
            AMS_ID=p_order.AMS_ID,
            AMS_TM=p_order.AMS_TM,
            APPROVAL_ID=p_order.APPROVAL_ID,
            APPROVAL_TM=p_order.APPROVAL_TM,
            CANCEL_QTY=p_order.CANCEL_QTY,
            REDUCE_QTY=p_order.REDUCE_QTY,
            ORD_STATUS=p_order.ORD_STATUS,
            ACTION=p_order.ACTION,
            EXCPT_REMARK=p_order.EXCPT_REMARK,
            REASON_CODE=p_order.REASON_CODE,
            NOTIFY_FLG=p_order.NOTIFY_FLG,
            NOTIFY_TM=p_order.NOTIFY_TM,
            ORD_TASK=p_order.ORD_TASK,
            QUEUE_TM=p_order.QUEUE_TM,
            ORD_QUEUED=p_order.ORD_QUEUED,
            AMEND_FROM=p_order.AMEND_FROM,
            AMEND_TO=p_order.AMEND_TO,
            NEXT_DAY=p_order.NEXT_DAY,
            GROUP_ID=p_order.GROUP_ID,
            BUSINESS_DT=p_order.BUSINESS_DT,
            NEW_PR=p_order.NEW_PR,
            NEW_QTY=p_order.NEW_QTY,
            REMARK=p_order.REMARK,
            BSK_FLG=p_order.BSK_FLG,
            BSK_PARENT=p_order.BSK_PARENT,
            INDEX_CODE=p_order.INDEX_CODE,
            AVG_FILLED_PR=p_order.AVG_FILLED_PR,
            OMNIBUSAC=p_order.OMNIBUSAC,
            CONTRA=p_order.CONTRA,
            SETT_TYPE=p_order.SETT_TYPE,
            SETT_CCY=p_order.SETT_CCY,
            CHANNEL_REF_NO=p_order.CHANNEL_REF_NO,
            DISCLOSED_QTY=p_order.DISCLOSED_QTY,
            MANUAL_TRADE=p_order.MANUAL_TRADE,
            DIRECT_TRADE=p_order.DIRECT_TRADE,
            COUNTERPARTY=p_order.COUNTERPARTY,
            ALERTFLG='0',
            ACKFLG='0'
        where REF_NO = p_order.REF_NO;
      END IF;
    END LOOP;
    COMMIT;
    END;Regards.
    Satyaki De.

  • Error in Query (Pls help)

    Hi friends,
    When i executed one of the queries, i get this error:
    Abort System error in program <b>CL_RSDM_READ_MASTER_DATA and form_sidval_direct</b>
    Diagnosis
    This internal error is a targeted termination since the program has an incorrect status.
    Procedure
    Analyse the situation and inform SAP.
    I have check all my infoobjects and master data...everything is in active but still i dont understand why i get this....
    please suggest how to get rid of this error? its urgent
    Regards
    Balaji

    Hi balaji,
       This can be program error, need to apply support package or correction,
    seems no oss found for form_sidval_direct .....
    perhaps it's sid error, try to analyze and repair the infoprovider where the query created on, use transaction RSRV.
    hope this helps.
    assign points if useful
    Regards,
    Archna

  • Cfgrid error -very urgent, pls help

    Hi all,
           I am working on a cfgrid to populate records and also there is a search button used for searching too. But when I enter a keyword and click search,
    grid will show correct records needed. But if I clicked 3 or 4 times search button after entering keyword, an error comes as follows "CFGRID: Response is empty [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]" .From application.log, I got this error mesage - The row number 0 is out of bounds. The specific sequence of files included or processed is:
    What is the problem actually ?
    When search button clicked, I am using Coldfusion.Grid.refresh to bind the grid.. and also I am fetching records from a text file, which contains about 3000 records.
    And also when I tested this with 15 records in a text file, this error is not coming...
    Atleast can you provide any mechanism to hide the error..
    I have tried try catch method, but failed to catch the error...
    Please help...

    I've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
    Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
    Do you want to enqueue messages?
    Post your DDL and other relevant information or you are on your own. We can not guess at your issue.

  • Error in trigger, pls help,10g,xp

    Please help me out from the following err in trigger
    Solved
    Thank you
    Edited by: Smile on Feb 19, 2013 2:15 AM                                                                                                                                                                                                                                                           

    83  exception
    84  when others then
    85  dbms_output.put_line('error');
    86  end;The most dangerous code one could write. Must be removed immediately
    http://tkyte.blogspot.com/2007/03/dreaded-others-then-null-strikes-again.html
    Message was edited by:
    karthick_arp

  • Halo, i hav an ipad2 version 4.3.5. now i went for updating it and while updating it shows error 4005. Pls help me in fixing this issue

    halo, iam using an ipad 2 and it was in version 4.3.5. Thought of updating it and went for it. While updating it shows error 4005 and i couldnt fix it. Can some one help me to fix this issue.

    You've tried the other things on those pages e.g. tried a different USB port on your computer and a different cable, tried the other pages that the first link
    If there’s an issue with the USB port, cable, dock, or hub, or if the device becomes disconnected during restore, try troubleshooting the USB connection, then troubleshooting your security software.
    If you checked your connections and are still seeing the error message, check for hardware issues.
    Check for hardware issues
    Related errors: 1, 3, 10, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1000, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
    Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the error message when you update or restore, contact Apple support.
    Do you have a different computer that you could try ?
    If you continue to see error 4005, 4013, or 4014 when you restore your device, contact Apple for support.

  • Adobe Flash Error...Pls help

    While I was doing a animation i got the following Error.....
    But I can,t understand about this...
    My RAM size is 1GB & Got a Virtual Memory of 8000Mb s..
    Also got plenty of free hard disk space(more than 100GB)..Please Help me on this matter..
    I am using adobe Flash CS5  Version 11.0.2
    Thank You.

    This looks like an Adobe Flash issue, not a Firefox issue. Have you tried asking in the Adobe forums? I did a quick search and found this: http://forums.adobe.com/thread/769338

  • WEBDAV component in Oracle UCM... error ... pls help me

    Hi I am not able to delete/ create /update any folderusing webdav. Initiall it was working good but after few days it is giving the below error.
    Content Server Request Failed
    Unable to execute service COLLECTION_NEW and function verifyNotBrowseMode.
    (System Error: Please switch out of the browse only mode to preform this operation.)
    [ Details ]
    The service stack for this request is
    --COLLECTION_NEW (**no captured values**)
    intradoc.data.DataException: !csCollectionWrongMode
         at collections.CollectionUserHandler.verifyNotBrowseMode(CollectionUserHandler.java:116)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
         at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
         at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
         at intradoc.server.Service.doCodeEx(Service.java:490)
         at intradoc.server.Service.doCode(Service.java:472)
         at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1360)
         at intradoc.server.Service.doAction(Service.java:452)
         at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1201)
         at intradoc.server.Service.doActions(Service.java:447)
         at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1121)
         at intradoc.server.Service.executeActions(Service.java:433)
         at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:635)
         at intradoc.server.Service.doRequest(Service.java:1707)
         at intradoc.server.ServiceManager.processCommand(ServiceManager.java:359)
         at intradoc.server.IdcServerThread.run(IdcServerThread.java:197)
    Plese suggest me how can I make this component works?

    Check your Folder configuration under 'My Content Server' , change the content style to native and clear the 'Show hidden when browsing' option.
    Hope this helps.
    Regards,
    -Mukesh.

  • My application occer the error message frequently,pls help me

    113127.hostname!WSH.49282: WSNAT_CAT:1287: WARN: Forced shutdown of client; user
    name 'XM0001_YY05'; client name '##.##.##.##'; workstation address '//##.##.##.##:MMMMM'

    Hi,
    The message means that the Handler kills the client.
    There can be couple of reasons for this:
    1. The Handler is dead, then all the clients that it handle will be killed.
    2. Check if you have the keepalive flag "-k" or option to kill clients that are
    not active for a period of time the in the WSL configuration.
    3. Your configuration of WSL/WSH is not enough to support your needs; you need
    to change the configuration file.
    Hope this will help.
    Revital
    "sam_cao" <[email protected]> wrote:
    >
    113127.hostname!WSH.49282: WSNAT_CAT:1287: WARN: Forced shutdown of client;
    user
    name 'XM0001_YY05'; client name '##.##.##.##'; workstation address '//##.##.##.##:MMMMM'

  • I have an error...pls help!!

    so this is the question:
    The task is to write a class that simulates a car. When an oject of
    this class is created, one must supply
    - The capacity of the fuel tank in gallons.
    - The fuel efficiency in miles per gallon;
    Newly manufactured cars have empty fuel tanks.
    The car will include the following displays (functions):
    -a fuel guage, giving a number between 0.0 and 1.0 indicating how much
    fuel is left in the tank.
    -on odometer, giving the total number of miles the car has travelled.
    The car should also support the following operations (procedures)
    -fill the fuel tank
    -drive a certaion mr of miles, consuming fuel. If there is insufficient
    fuel to drive the whole distance, drive until the fuel is exhausted.
    (You may wixh to use Math.min or Math.max to implement this part)
    class car{
         int capacity;
         int fuelEfficiency;
         float meter;
         double miles;
         public car(int c, int f, float meter, double miles)
              capacity = c;
              fuelEfficiency = f;
              meter = 0;
              miles = 0;
         public int getFuelLeft()
         return (fuelEfficiency/capacity);
         public double getMilage()
         return miles;
         public void setCapacity()
              capacity = fuelEfficiency;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    class cardemo{
         public static void main (String[] args) throws IOException{
         BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
         Car mycar = new Car(c,f,meter,miles);
         //menu
         System.out.println("1. Input capacity.");
         System.out.println("2. Input fuel efficiency.");
         System.out.println("3. View fuel guage.");
         System.out.println("4. View odometer.");
         System.out.println("5. Fill the tank.");
         System.out.println("6. Drive a certain number of miles.");
         System.out.println("7. Exit.");
         int choice = 0;
         while(choice != 7 ) // 7 = exit
              System.out.println("INPUT YOUR CHOICE");
              choice = Integer.parseInt(reader.readLine());
              switch(choice)
                   case 1:
                   System.out.println("Input capacity of the fuel tank in gallons");
                   int capacity = Integer.parseInt(reader.readLine()); // capacity input
                   break;
                   case 2:
                   System.out.println("Input fuel efficiency in miles per gallon");
                   int fuelEfficiency = Integer.parseInt(reader.readLine()); // fuel efficiency input
                   break;
                   case 3:
                   System.out.println("View fuel guage.");
                   System.out.println("Fuel left in tha tank: "+mycar.getFuelLeft());
                   case 4:
                   System.out.println("View odometer.");
                   System.out.println("Total number of miles the car has travelled: "+mycar.getMiles());
                   case 5:
                   System.out.println("Fill the tank.");
                   System.out.println("The fuel tank is full :"+mycar.setCapacity());
                   case 6:
                   System.out.println("How much miles would you like to travel.");
                   double miles = Integer.parseInt(reader.readLine()); // miles input
                   double drive = miles/fuelEfficiency; // gallons needed to finish journey
                   if (drive > capacity) //gallons needed to finsh journey is more than gallon capacity
                        System.out.println("There is no sufficient fuel to drive the whole distance.");
                        System.out.println("Your car will drive until the fuel is exhuasted.");
                        //upgrade odometer (miles) (adek trid tamila)
                        System.out.println("Your car will be able to drive "+miles+" miles.");
                        drive = drive - capacity; //gallons needed to continue journey
                        System.out.println("You will need "+drive+" more gallons to drive "+miles+" miles.");
                   else
                        System.out.println("You have sufficient fuel to drive the whole distance.");
                        drive = capacity - drive; //gallons left in tank
                        System.out.println("You have "+drive+" gallons of fuel left to use.");
                   default:
                   System.out.println("Invalid choice number.");
                   break;
    i am getting this error in the main:
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : class Car
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : class Car
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : variable c
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : variable f
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : variable meter
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    C:\Documents and Settings\Francis Cutajar\Desktop\cardemo.java:10: cannot find symbol
    symbol : variable miles
    location: class cardemo
         Car mycar = new Car(c,f,meter,miles);
         ^
    6 errors
    can you please tell me how i shoul code it =]

    PoisonGirl wrote:
    so it should be like this: car mycar = new car(...);
    although im still getting an error in (c,f,meter,miles)
    where am i wrong?lots of places. more to follow...
    1) Your Car constructor takes a meter parameter. What's that?
    2) Why pass a miles variable into the Car constructor? Won't that always be zero on construction, so a parameter is unnecessary?
    3) Since you need some data present before you can construct a car, you will likely need to collect the data from the user before trying to construct car.
    4) You can't just pass variables to a method or constructor when the variables simply do not exist.
    5) You need to learn the technique of incremental programming where you create your program in little steps, adding only a small amount of code and then not adding any more until the code present compiles. It looks like you kept adding code to a doomed program increasing your number errors umpteen fold.
    Edited by: Encephalopathic on Aug 18, 2008 3:15 PM

  • Unexpected Error - client$1 - pls help...

    Hi, I'm just started to set up my first app with Java Web Starter.
    I've solved al lot of problems and this one I can't find...
    Everything is going fine, he downloads the apps, start the installaten and then it stops with the error:
    Category: Unexpected Error
    client$1
    this is the code:
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class client extends JFrame {
         private JTextField enter;
         private JTextArea display;
         ObjectOutputStream output;
         ObjectInputStream input;
         String message = "";
         public client()
              super( "client" );
              Container c = getContentPane();
              enter = new JTextField();
              enter.setEnabled (false);
              enter.addActionListener(
                   new ActionListener() {
                        public void actionPerformed (ActionEvent e )
                             sendData (e.getActionCommand() );
              c.add (enter, BorderLayout.NORTH);
              display = new JTextArea();
              c.add ( new JScrollPane ( display), BorderLayout.CENTER);
              setSize (300, 150);
              show();
         public void runclient()
              Socket client;
              try {
                   String IP = JOptionPane.showInputDialog ("Geef IP of host in");
                   display.setText ( "Attempting to make connection\n" );
                   client = new Socket (
                        InetAddress.getByName ( IP ), 5222 );
                   display.append ("Connected to: " +
                        client.getInetAddress().getHostName() );
                   output = new ObjectOutputStream(
                        client.getOutputStream() );
                   output.flush();
                   input = new ObjectInputStream(
                        client.getInputStream() );
                   display.append ( "\nGot I/O streams\n" );
                   enter.setEnabled (true);
                   do {
                        try {
                             message = (String) input.readObject();
                             display.append ( "\n" + message);
                             display.setCaretPosition(
                                  display.getText().length() );
                        catch ( ClassNotFoundException cnfex ) {
                             display.append (
                                  "\nUnknown object type received.\n" );
                   }while ( !message.equals ( "SERVER>>> TERMINATE") );
                   display.append ( "closing connection.\n" );
                   input.close();
                   output.close();
                   client.close();
              catch ( EOFException eof ) {
                   System.out.println ( "Server terminated connection" );
              catch (IOException e ) {
                   e.printStackTrace();
         private void sendData (String s)
              try {
                   message = s;
                   output.writeObject ( "CLIENT>>> " + s );
                   output.flush();
                   display.append ( "\nCLIENT>>>" + s );
              catch (IOException cnfex ) {
                   display.append(
                        "\nError writing object" );
         public static void main ( String[] args )
              client app = new client();
              app.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing ( WindowEvent e )
                             System.exit(0);
              app.runclient();
    And is this the right command to make the rar?: jar cvf client.jar client.class
    After that command I added a signature.
    Is this about classpaths or anything?
    This is the webstart log:
    java.lang.NoClassDefFoundError: client$1
         at client.<init>(client.java:22)
         at client.main(client.java:102)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Greetz

    I found the solution. I used RealJ als editor and compiler and it seems he makes 3 files. client.class client$1.class and client$2.class. I thought these where backup classes. I included this 3 files in my JAR file and everything is going fine :)

Maybe you are looking for

  • SQL Developer 3.1.07 does not show a Tables entry under the Navigator

    Installed SQL Developer 3.1.07. Under my Connections window, I log into the SYSTEM account. There is NO tables entry. SYSTEM has access to all tables in the database. It's the same behavior for other database users as well. I re-installed SQL Develop

  • Sql Server  service is not starting

    Hi all, in one of my client place, we were running SAP 4.0B on NT server with SQL 2000 server. from few days onwards.... if we happend to restart server after hardware maintenance (or any other job), SQL server Icon on task bar will be in red colour.

  • Getting all service names and users

    Hi all, Can i ger all service names in database and users related to that service names . Thanks in advance.

  • Automatic Notification from Usage Decition

    Hi PM Exports, could any one suggest me a method to auto generate PM Notifications based on usage decision? My client Processes equipment in "Object" tab in a PM Order via QM Inspection Lots. Each equipment has to be check to see whether it pass/fail

  • Unplanned cost in miro

    Dear Forum, I would like to seek clarification on unplanned cost book during miro. For planned, it will credit vendor debit freight clearing account. For unplanned, it only can be prorated and distributed in the po item lines. Unplanned cost cannot b