Have error in my program!

WHEN I COMPILE THE PROGRAM
HAVE THIS MESSAGE:
NOTE: Grab.java uses or overrides a deprecated API.
Note: Recompile with-depreaction for details.
AND I COMPILE AGAIN WITH -depreaction
THEN have this message:
Grab.java :44 : warning: readLine() in java.io.DataInputStream has been depreaction
while ((input = in.readLine()) != null)
^
THIS IS WHAT ERROR?? AND HOW TO CHANGE?
THE PROGRAM IS :
import java.net.*;
import java.io.*;
public class Grab
     public Grab (String textURL) throws IOException
          Socket socket = null;
          dissect (textURL);
          socket=connect();
          try { grab(); }
          finally { socket.close(); }
     protected String host, file;
     protected int port;
     protected void dissect (String textURL) throws MalformedURLException
          URL url = new URL(textURL);
          host = url.getHost();
          port = url.getPort();
          if (port == -1) port = 80;
          file = url.getFile();
     protected DataInputStream in;
     protected DataOutputStream out;
     protected Socket connect() throws IOException
          System.out.println("Connecting to " + host + ":" + port + "..");
          Socket socket = new Socket(host,port);
          System.out.println ("Connected.");
          OutputStream rawOut = socket.getOutputStream();
          InputStream rawIn = socket.getInputStream();
          BufferedOutputStream buffOut = new BufferedOutputStream(rawOut);
          out = new DataOutputStream (buffOut);
          in = new DataInputStream (rawIn);
          return socket;
     protected void grab() throws IOException
          System.out.println("Sending request..");
          out.writeBytes ("Get " + file + " HTTP/1.0\r\n\r\n");
          out.flush();
          System.out.println("Waiting for response..");
          String input;
          while ((input = in.readLine()) != null)
               System.out.println(input);
     public static void main (String args[]) throws IOException
          DataInputStream kbd = new DataInputStream(System.in);
          while (true)
               String textURL;
               System.out.print("Enter an URL: ");
               System.out.flush();
               if ((textURL = kbd.readLine()) == null) break;
               try { new Grab (textURL); }
               catch (IOException ex)
                    ex.printStackTrace();
                    continue;
               System.out.println ("- OK -");
          System.out.println ("exit");
}

Have you read the API?
http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html
It tells you why this method is deprecated and what method to use instead.
kari-matti

Similar Messages

  • TS3694 Have error message ....Runtime Error! program: C:\Program Files (X86)\itunes\iunes.exe   R6034

    Have error message ....Runtime Error! program: C:\Program Files (X86)\itunes\iunes.exe   R6034

    Apple's advice on this issue can now be found here: TS5376: iTunes 11.1.4 for Windows: Unable to install or open.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See the user tip Backup your iTunes for Windows library with SyncToy for a suggested strategy.
    If you have difficulty downloading the iTunes setup file try clearing your browser's cache or using an alternate browser.
    If content is missing from the library following the repair see Empty/corrupt iTunes library after upgrade/crash.
    For device connectivity issues following the repair see TS1538: iOS: Device not recognized in iTunes for Windows, in particular section 5.
    MobileMe is a discontinued service and should be removed if present. See HT2992: MobileMe: Uninstalling the MobileMe Control Panel for Windows for details.
    tt2

  • Table Containing Details of Program Names that have errors

    hi,
    As we can get the Dump analysis in ST22, i want to get the names of the programs that are shown up here. i.e, which table holds the data that contains the names of the programs that have errors or exceptions.

    Hi Harsha,
    just check the tables DD02L and DD03L 
    HOPE IT WILL HELP YOU
    Regards
    Rahul sharma

  • I keep getting Error 150:30, What should I do? I have not used this program in over a year.

    I keep getting Error 150:30, what should I do? I have not used this program in over a year.

    Well, what program? Anyway, try this:
    Error "Licensing has stopped working"
    Mylenium

  • Cannot load programs they either have error or you open the app and it returns to main menu

    Cannot load programs they either have error 606 or you open the app and it closes and goes to main screen

    Best to do a soft restart, <Hold down the "off" key on top and the "home" button at the bottom until it resets and you see the apple logo. It usually helps with those issues.

  • When I open Firefox I have to try several times because a Runtime Error with the program C:\Windows\System32\regsvr32.exe

    when I open Firefox I have to try several times because a Runtime Error with the program C:\Windows\System32\regsvr32.exe

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "Continue in Safe Mode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • I have been trying to install the new iTunes, and i get an error that a program could not be run.

    I have an old version of iTunes and require the new version to connect my IPod. A program can not be run and the installation stops. I have no idea what program or what is required to run it. Please Help.

    That would be my first guess.  You might be trying to install the 32 bit version of the program.
    Update the thread with more info on your apple software etc if its a 64 bit install you're trying to perform.

  • RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ''

    Hi,
    While executing the below code i am getting the error
    " RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ' ' am new to ABAP , can anyone kindly help me where i have went wrong ? .
    IF ( V_DO_CDS_NAME_MAIN <> '' ).
        ABAP.
            DATA: ref_it_tab TYPE REF TO data,
                  ref_wa TYPE REF TO data.
            FIELD-SYMBOLS: <fs_itab> TYPE ANY TABLE.
            FIELD-SYMBOLS: <fs_wa> TYPE ANY.
            FIELD-SYMBOLS: <fs_field> TYPE ANY.
            CREATE DATA ref_it_tab TYPE STANDARD TABLE OF (V_DO_CDS_NAME_MAIN) WITH NON-UNIQUE DEFAULT KEY.
            ASSIGN ref_it_tab->* TO <fs_itab>.
            SELECT * FROM (V_DO_CDS_NAME_MAIN) INTO TABLE <fs_itab> where C1 = V_WORK_ITEM_ID_MAIN.
            CREATE DATA ref_wa LIKE LINE OF <fs_itab>.
            ASSIGN ref_wa->* TO <fs_wa>.
            loop at <fs_itab> assigning <fs_wa>.
                assign component 'CLIENT' of structure <fs_wa> to <fs_field>.
                V_CLIENT = <fs_field>.
                assign component 'C0' of structure <fs_wa> to <fs_field>.
                V_C0 = <fs_field>.
                assign component 'C1' of structure <fs_wa> to <fs_field>.
                V_C1 = <fs_field>.
                assign component 'C2' of structure <fs_wa> to <fs_field>.
                V_C2 = <fs_field>.
                assign component 'C3' of structure <fs_wa> to <fs_field>.
                V_C3 = <fs_field>.
                assign component 'C4' of structure <fs_wa> to <fs_field>.
                V_C4 = <fs_field>.
                assign component 'C5' of structure <fs_wa> to <fs_field>.
                V_C5 = <fs_field>.
                assign component 'C6' of structure <fs_wa> to <fs_field>.
                V_C6 = <fs_field>.
                assign component 'C7' of structure <fs_wa> to <fs_field>.
                V_C7 = <fs_field>.
                assign component 'C8' of structure <fs_wa> to <fs_field>.
                V_C8 = <fs_field>.
                assign component 'MESSAGE_ID' of structure <fs_wa> to <fs_field>.
                V_MESSAGE_ID = <fs_field>.
                assign component 'TIMESTAMP' of structure <fs_wa> to <fs_field>.
                V_TIMESTAMP = <fs_field>.
                assign component 'EXTRACTKEY' of structure <fs_wa> to <fs_field>.
                V_EXTRACTKEY = <fs_field>.
                assign component 'STATEID' of structure <fs_wa> to <fs_field>.
                V_STATEID = <fs_field>.
                assign component 'DEVICE_ID' of structure <fs_wa> to <fs_field>.
                V_DEVICE_ID = <fs_field>.
            ENDLOOP.
        ENDABAP.
    ENDIF.

    Hi Mubeen,
    While Copying the cotes have come closer otherwise its working fine , i was able to find the error .
    There are ten predefined ABAP data types. There are 100 possible type combinations between these elementary data types. ABAP supports automatic type conversion and length adjustment for all of them except type D (date) and type T (time) fields which cannot be converted into each other.
    I commented the TimeStamp part where i had given the ABAP Type as D and it started working .
    But now i want to display the content of  "TimeStamp"  field but i am not able to do so .
    This is the format in which it has to be displayed 2009.011.915.3353.
    Which ABAPTYPE i need to use ?.
    i am able to display in this format 20090119153353
    regards
    Harsha

  • Why do I have to choose a program to open Firefox? Please HELP

    When ever I go to open Firefox I have to pick a program which to open it with. This is happening to all software from start menu or icons on desk top. I figured if I can fix Firefox than I will know what to do with the rest. I have to right click a menu comes up called File type helper. It has 3 choices I pick open with software installed on computer I pick Firefox and it opens up. If I pick one of the other 2 choices, (read about ink file, search internet) The IE opens but will not stay open. Also can some one email me on how to find my question to look and see if I have any answers.

    This is a problem in Windows, as you surmised. I found some Microsoft Support articles that might help:
    * [http://support.microsoft.com/kb/923077 You cannot open files that have extensions such as.exe,.com, and.lnk on a Windows XP-based computer]
    * [http://support.microsoft.com/kb/837334 You receive an error message when you try to start a program that has an.exe file name extension]
    Lots of Microsoft forum results, too: [https://www.google.com/search?q=windows-xp+choose+program+open+exe+site%3Amicrosoft.com&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a windows-xp choose program open exe site:microsoft.com - Google Search]

  • Error while loading program...Please help.. :)

    Hello All,
    Have written a HTMLB program (DBConnect.java) which takes data from database and retrieves it in TableView.
    But it does not work.
    Get this error:
    Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/htmlb/page/PageProcessorComponent
    Loader Info -
    ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@1e72d6]
    Parent loader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@9cf322]
    References:
       not registered!
    No resources !
    The error occurred while trying to load "com.sap.sample.database.DBConnect".
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:389)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
         ... 30 more
    I have also included the PageProcessorComponent class file in my project properties.
    Please help....Whatz wrong.
    Awaiting Reply.
    Thanks and Warm Regards,
    Ritu R Hunjan

    Hi Ritu,
    Change the PrivateSharingReference to SharingReference in the xml
    <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
    ==========
    Change your xml to
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
    </application-config>
    <components>
    <component name="DBConnect">
    <component-config>
    <property name="ClassName" value="com.sap.sample.database.DBConnect"/>
    </component-config>
    <component-profile>
    <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld" />
    </component-profile>
    </component>
    </components>
    <services/>
    </application>

  • Error while executing program

    Hi ,In sap bods,  im using abap dataflow as my source and target is flat files ,while im executing its showing error
    "Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/zcustdim.aba> error <    Open File Error"
    how can i solve this problem,
    Moderator message: please have a look in the forums for Business Objects.
    Edited by: Thomas Zloch on Mar 8, 2012

    Prem,
    Looking at the error that you have shown, looks like its a different error. Is there a control/GRID that is being used in the program.
    If you are using a CUSTOM CONTAINER and a GRID to display the data, whenever you executing the program, you should not create the container. Something like this ..
        if cl_gui_alv_grid=>offline( ) is initial.
          create object CUSTOM_CONTAINER
                 exporting container_name = CUSTOM_CONTROL
        endif.
    Regards,
    Ravi
    note : Please reward the helpful posts.

  • Error message c:\program files (x86)\itunes\ituneshelper.exe   r6034

    can not log into itunes, get the following error message:  c:\program files (x86)\itunes\itunes help.exe
    R6034
    I have uninstalled and reinstalled and still unable to login

    Apple's advice on this issue can now be found here: TS5376: iTunes 11.1.4 for Windows: Unable to install or open.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See the user tip Backup your iTunes for Windows library with SyncToy for a suggested strategy.
    If you have difficulty downloading the iTunes setup file try clearing your browser's cache or using an alternate browser.
    If content is missing from the library following the repair see Empty/corrupt iTunes library after upgrade/crash.
    For device connectivity issues following the repair see TS1538: iOS: Device not recognized in iTunes for Windows, in particular section 5.
    MobileMe is a discontinued service and should be removed if present. See HT2992: MobileMe: Uninstalling the MobileMe Control Panel for Windows for details.
    tt2

  • I had to reinstall CS4 and now have error messages when opening bridge and photoshop

    The error message is "The specified module could not be found. C:\Program Files (x86)\Common Files\Adobe\Adobe Version Cue CS4\Client\4.0.1\Version Cue.DLL

    I tried what you suggested and it did not help.  whenever I try to open either photoshop or bridge, I get a message saying that there was a problem loading scripts the last time that Bridge was open and do I want to try loading them again?  If I click yes, I get that same error message that I reported in my original question and photoshop/bridge will immediately close.  If I click no, photoshop and bridge will open but it will not let me open a raw format document.  It seems like Adobe Camera Raw is not being recognized.   One of the updates I downloaded was an update to Adobe Camera Raw so the functionality is there, it just can't be accessed.  do you think I should try to uninstall and re-install Photoshop again?
    Date: Mon, 3 Sep 2012 19:48:31 -0600
    From: [email protected]
    To: [email protected]
    Subject: I had to reinstall CS4 and now have error messages when opening bridge and photoshop
        Re: I had to reinstall CS4 and now have error messages when opening bridge and photoshop
        created by Arpit Kapoor in Downloading, Installing, Setting Up - View the full discussion
    Go To Help->Updates and install the latest update. It should work.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4670793#4670793
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4670793#4670793. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Hierarchy load - Error RSAR 683 Syntax error in generated program, row 0

    Hi guys,
    When I load the hierarchy on ZMATERIAL (load from 0MATERIAL hierarchy - source system BW), I have this error message : RSAR 683 Syntax error in generated program, row 0.
    I have found several SAP notes, especially [Sap Note 944842|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler], but the implementation on our system does not change anything.
    We are working on BW3.5 SP12.
    Can anyone could tell me what to do ?
    Will this issue be solved once we upgrade until SP18 as it is mentionned in the SAPNote ?
    Thanks,
    Alexandra
    Edited by: Alexandra Guillaux on Apr 1, 2009 4:36 PM

    Hello Alex,
    after implementing the corrrection part of note 944842 via SNOTE, plaese also:
    1. replicate datasource
    2. activate transfer structure (report RS_TRANSTRU_ACTIVATE_ALL)
    3. activate infoobject   (make dummy change to description
    of infoobject etc, save and activate it, remove change and save and
    activate it again).
    Hope it could resolve the incident.
    Thank you & Best regards,
    Vince

  • Syntax Error in generated program.

    Hi Experts -
    I saw a similar thread regarding the issue I'm having but I thought I'd open another thread.
    0CMMT_ITEM_FMCI_PU_HIER Syntax Error for Generated Program
    I'm doing an extraction for 0CRM_ORGUNIT_HR01_HIER in RSA3 of CRM.
    I get an error message:
    Message RJ028 : Error 6 in function module RSS_PROGRAM_GENERATE
    There is a syntax error in the code.
    How do you solve this issue?
    We applied OSS note 822323 but still get the same error. The code still has the syntax error.
    Any one saw this or have any solutions? Please let me know. Thanks a lot in advance!

    Hi,
    Use the program RSA1HCAT in SE38 to check your hierarchy.
    Transaction RSA3 was not developed for checking hierarchy DataSources.
    Rather, it is only for transaction and attribute/text datasources.  If
    you want to check the extraction of hierarchy datasources in the R/3
    system, you should use the report RSA1HCAT.  In this report, enter the
    name of the hierarchy datasource in the "DataSource with HierarchyType"
    field.
    For this problem look at the note: 632920.
    Regards,
    Srikanth.

Maybe you are looking for

  • How do I add an Attachment to an E-mail letter ?

    I have to send two images of my art work to a gallery owner using E-mail. I have put each of these images on my desktop because I was told that it would be easier to attach them to the E-mail. But I'm unable to attach them. Please tell me how to do i

  • Control via acty confin with procsng of Ser. Entry Shet accept or Payemnt

    Hello, Business Scenario: There is two departments involved in project i.e. one department (Network Procurement) responsible for project accounting and payment of invoices and other department (Network Engineering) is responsible for project monitori

  • PUT key at a particular location in LinkedHashMap

    Hi, Can a key be inserted at a particular index of LinkedHashMap. As LinkedHashMap is a doubly linked list I think there it a way out to add a key at particular index. Thanks, Rhea

  • Global Order Promising query -- Action Code

    This is regarding the GOP(11i ) , mrp_atp_pub_call parameter action code . As per the Oracle it has three values Action: Type of Inquiry 100- ATP Inquiry 110- Scheduling 120 - Rescheduling My ask is : 1. Do we per/Unpeg supplay demand or reservation

  • Material Master Error

    Hi..     i have a three level bom. Second and third level having semifinsh and raw material. Now i want to change the material master of one fo semifinsh material. But system doesnt allow me to do thi s. it giving error as The value 7206.10.10 is not