How to find ip address of a PC using Core Java

Hi guys,
i would like to find out the ip address of currently running system i.e my PC using Core Java
Hows that possible,....
Code if any would be highly appreciable.....

Deepak_A_L wrote:
Hi guys,
i would like to find out the ip address of currently running system i.e my PC using Core Java
Hows that possible,....
Code if any would be highly appreciable.....
String ipAddress = "0.0.0.0";
     String hostName  = "NA";
     String connonicalName = "NA"
      try{
        ipAddress = InetAddress.getLocalHost().getHostAddress(); 
        hostName = InetAddress.getLocalHost().getHostName(); 
        connonicalName = InetAddress.getLocalHost().getCanonicalHostName();
      }catch(Exception exp){
           exp.printStackTrace();
      }Don't forget to import InetAddress Class from java.net package.
Hope that might help :)
REGARDS,
RaHuL

Similar Messages

  • How to find MAC-Address of a device using ADF mobile?

    Hi,
    I am developing an mobile application using ADF Mobile. The application necessitates the use of MAC Address for further development.
    Android SDK provides an easy way to find the MAC Address as:
    WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
    WifiInfo wInfo = wifiManager.getConnectionInfo();
    String macAddress = wInfo.getMacAddress();
    Is there a similar way in ADF mobile to retrieve the MAC Address of the device?
    Regards,
    Joseph

    This cant be done.

  • How to find mac address of a client computer in specified time and port in WIFI WCS Control system

    how to find mac address of a client computer in specified time and port in WIFI WCS Control system

    WCS record-keeping is very crude.  
    You'll get the time/date when the client authenticated.  You'll get the local inside address but you'll need the router to translate the outside IP address and the port.  
    You will need a proxy server to determine what sites did a wireless client goes.

  • How to find out Address no for each item

    Hi All,
    how to find out address no (ADRNR) for each item in the PO (ME23N).
    will it created by automatically or mannually?
    Please Very urgent.
    Thanks,
    Subbu.

    Hey Subbu,
    We meet again
    check
    table EKPO
    for each line item for a particular PO
    there u have adrnr.
    This is the  address number for each line item

  • How to find out that particular structure is used in which tables

    Hello Friends,
    Most of the times through techinal information we come to know the table name for a particular field.And in se16 when i give that table name than system says its structure and not the table.So in se11 when i give that structure name in database table field, its shows all the field in that structure, but not the data stored in that field.
    So my question is how to find out that particular structure is used in which tables,so that i can view data stored in that structure?
    Thanking you guys in advance.
    Regards,
    Jitendra

    Dear,
    When you click on the technical information it will give the structure name and field, double click on the structure and it will take you the display structure screen, there you will have the where-used List icon (Ctrl + Shift + F3) at the top , click on that and it will show the options, select Database tables and execute, it will give the tables related to the structure, you can explore the list of tables and find where your required field is stored in them.
    Thanks & Regards,
    Vijaya Bhaskar A

  • How to find out the Non Partitioned Tables used 2Gb on oracle

    Hi team
    how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
    regards

    heres 1 I made earlier
    set pagesize 999
    set linesize 132
    col owner format a25
    col segment_name format a60
    select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
    from dba_segments
    where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
    and segment_type = 'TABLE'
    having (bytes/1024/1024) > 2000
    group by bytes, segment_Type, segment_name, owner
    order by 4 asc

  • How to find where the below sql is used in database

    Hi all,
    I am tring to find the below SQL in our data base where it is used?
    I had done the checking in all reports manually, But have no luck.
    But i am sure that the below sql is in our data base and having some issue on it.
    Can any one please let me know how to find where the below query is used in our database? I mean in packages/ triggers/ procedures or any where in our database
    Please find the query
    select count(sh.shipment_gid) from SHIPMENT sh, SHIPMENT_TYPE stp, LOCATION ld where (sh.shipment_gid in (select sstop.shipment_gid from SHIPMENT_STOP sstop where (sstop.appointment_delivery > trunc(TO_DATE(:1, :2), :3)) and (sstop.appointment_delivery is not null))) and (sh.is_to_be_held=:"SYS_B_0") and (sh.domain_name=:4) and (sh.insurance_policy_number like :"SYS_B_1") and (sh.perspective=:"SYS_B_2") and (sh.shipment_type_gid=stp.shipment_type_gid) and (sh.dest_location_gid=ld.location_gid(+)) and (stp.shipment_type_xid!=:5) order by ld.location_name, sh.start_time
    Regards,
    Dpk

    There is video demonstration how to import from data dictionary.
    After import you can select from the main menu: View->DDL File Editor menu item to open the DDL dialog and then click on "Generate" button on the dialog. When the DDL is generated you can search in it using "Find" button.
    Ivan

  • How to find function module's and tables used for the particulat screen or TCODE?

    Hello Nation,
    I would like to know how to find the  function modules and tables used for the particular screen or TCODE or program.
    Example : I would like know the function module used in the program RDBGFT?
                     How can i find that?
    Thanks in advance ,Awaiting your reply.

    Make use of Find function  with the keyword "CALL FUNCTION".
    Make use of the same find function with the keyword "Select" to know the database tables used.
    Regards,
    Philip.

  • How to find MAC Address in Java, Windows Environment

    Dear All,
    How to find the MAC address of a machine, provided the IPAddress of the machine.
    Thnx in advance..

    Generally you can't. MAC addresses do not travel through routers.
    For computers on your local subnet: connect to the computer somehow so that your computer knows the MAC, then run the command "arp -a" with Runtime.exec() and parse the output.
    Or write a program/servlet that runs on the remote computer and returns that computer's MAC (or some of the MACs for computers with several network cards.)

  • How to find port address in AL11

    Hi ,
    In transaction AL11.
    I need to know the port address defined for the directories in AL11 .
    How we find the port?
    Good answers will be really appreciated .
    Regards & Thanks
    Sandeep

    Hi,
    Please check the table
    user_dir for this
    report - RSWATCH0 to refer to directories.
    FM   - /SAPDMC/LSM_F4_SERVER_FILE.
    Other AL11 related FM
    EPS_GET_DIRECTORY_LISTING      Get directory listing
    EPS_GET_DIRECTORY_PATH         Get directory path for EPS subdirectories
    EPS_GET_FILE_ATTRIBUTES
    EPS_GET_FTP_SYSTEM_INFO        Get ftp system info
    EPS_INFO_TO_STRING
    EPS_OPEN_INPUT_FILE            Open file for input
    EPS_OPEN_OUTPUT_FILE           Open file for output
    Thanks & Regards,
    Chandralekha.

  • JavaMail Question: How to find IP address of email sender?

    Hi,
    I currently have a program that fetches email from a pop3 server and processes the email text.
    I want to filter out emails to process based on IP address of the sender.
    Can you please tell me whether it is possible to obtain the IP address of the sender using JavaMail?
    If yes, how? If not, what else can I use?
    Thanks,
    nitrousFiz

    Fayezin wrote:
    I have checked the RECEIVED headers closely. It seems that the last IP is of my mail server, not my machine from which the email was sent. Excellent. You have done the experiment. Now you know what IP addresses you can get.
    Is there a way to get the sender's machine IP or do I have to settle for the email server IP?So you did the experiment. You have the results. They already told you the answer to that.
    Here's what you need: an understanding of e-mail's architecture. As you already know, it's the servers that send the messages around the Internet. The servers have their own ways of deciding whether to trust an e-mail client. They may use authentication or lists of approved relayers or something else, or they may blindly trust everyone, but it's up to the initial server to decide whether to trust a client.
    It is NOT up to the receiving server to decide whether to trust a client of another server. That's not its business. The receiving server only has the option of deciding whether to trust other servers. In particular your desire to process e-mails from specific locations only is in conflict with the basic architecture of e-mail.
    So, I don't know where that requirement came from but if it's really aimed at the client who is sending the e-mail then you can't do that. It would be best to go back and find out why you have that requirement and how that can be implemented within the existing e-mail architecture.

  • How to find web address for SAP GUI for HTML enabled transaction ?

    HI All ,
    I have a transaction and in SE93 , the SAP GUI for HTML checkbox is marked for this transaction .
    I believe we can access this transaction via web .
    How to find URL for this web address ?
    Please advise .
    Regards,
    Ambar Patil .

    can be done through SICF

  • How to find out number of  years worked using sql

    Hello,
    How to find from a table which has hiredate and should return number of years worked with range like 0-5, 5-10,10-15 etc.
    Any help is highly appreciated.
    Thanks

    I think this query can solve your issue
    SELECT CASE yeared,COUNT(CASE) FROM
    SELECT
    CASE
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=5 THEN '0-5'
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 > 5 AND MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=10 THEN '5-10'
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 > 10 AND MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=15 THEN '10-15'
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 > 15 AND MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=20 THEN '15-20'
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 > 20 AND MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=25 THEN '20-25'
    WHEN MONTHS_BETWEEN(SYSDATE,hiredate)/12 > 25 AND MONTHS_BETWEEN(SYSDATE,hiredate)/12 <=30 THEN '25-30'
    ELSE '>=30'
    END CASE
    FROM scott.emp )
    GROUP BY CASE
    Regards.

  • How to find out which queries are being used ?

    We have a number of InfoSet Queries which the users are calling from SQ00. Some of them are very old.
    I would like to find out which queries are being used, so we can have the idle queries decommissioned.
    How can this be done ?
    Best regards,
    Peter

    Hi,
    It's been a while since I've done this but one method is to use ST03N & look for the execution of programs with an AQ* prefix.  The general structure is AQZZ/<query user group><query name>.
    You could probably get the same info from the audit log but I've not checked that.
    Cheers,

  • How to find out the 'z' user exit used in a Particular Transaction

    Hi,
    I have requirement to analyse all the user exits used in a transaction say 'VA01' . How can i find the user exits in a VA01 transaction. Can anyone suggest how to find the User exits
    Thanks in Anticipation.
    With Best Regards
    mamatha

    you can execute the following program , give the transaction name and execute
    *& Report  YCHATEST                                                    *
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    * Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    * Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    * Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    * Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

Maybe you are looking for

  • Problem in invoice postings in MIRO for imported material

    IMPORT SCENARIO Details 1)Import PO is created with 4 conditions a) BCD b) CVD c) AddCVD d) Ecess e) ECS on CVD 2) MIGO was already done With above conditions +1% adll SeCess on a) & b) and ) AddCVD( non deductible) Total 7 conditions were incorporat

  • Multiple video ichat

    you've seen the Apple photo of 3 different people video chating. We'll we've never been able to do it. Wife has ibook ppc with leopard, I have g4 tower ppc with tiger and niece has ibook intel with leopard. We ALL have latest builds of ALL Apple soft

  • Photo Booth Lags

    I just got mac os x mountain lion today. There are lots of improvements but photo booth didn't didn't work as well as it did on snow leopard. It constantly lags and the sound is not there. Even on playbaack the video is very jagged and the video spee

  • Latest update doesn't allow disney digital book apps to open. how do I fix it?

    I havea couple of Disney digital books (apps for ipad). I have loaded the latest update to the ipad and now they won't open.  I have deleted them from my ipad and reinstalled them by syncing with my itunes, but still to now avail.  I have also tried

  • Required attribute version missing from element xsl:stylesheet

    Tools: Jdeveloper : 10.1.3.3 Error: Every time I add transform process activity and try to create mappings I am not able to save them. In source view I see this error "Required attribute version missing from element xsl:stylesheet". I cannot continue