Results 1 to 2 of 2
  1. #1
    zakhilton is offline Member
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default How to get java to print external address

    i apologies if this is in the wrong part of the forum. part of a program i am making requires me to print out some network information of the computer the application is running on. i have manage to get the local ip address to print to console

    InetAddress IP=InetAddress.getLocalHost();
    String Local = IP.getHostAddress();
    System.out.println("IP of my system is: "+ Local);

    but i am unable to get and print out my external ip address. could anyone help with this please

    Thank you

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,039
    Rep Power
    6

    Default Re: How to get java to print external address

    Please show all of your code relevant to the problem (should be very short and fully compilable).

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. How do you edit the address bar using java?
    By nPwn in forum Advanced Java
    Replies: 1
    Last Post: 02-17-2012, 11:03 PM
  2. Open external file with external program
    By Wietse de Vries in forum New To Java
    Replies: 1
    Last Post: 12-31-2011, 05:52 PM
  3. Print an external file from Java or JavaScript
    By sehudson in forum AWT / Swing
    Replies: 5
    Last Post: 06-24-2010, 02:08 PM
  4. sort IP address in java
    By nilesh_123 in forum Networking
    Replies: 8
    Last Post: 10-18-2008, 11:08 PM
  5. I am not able to print Address
    By Albert in forum New To Java
    Replies: 1
    Last Post: 07-13-2007, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •