FQDN to IP

Discussion in 'Java' started by GSA, Nov 19, 2010.

  1. GSA

    GSA Guest

    Hi,
    I want to convert FQDN to IP Address. Please let me know the java api
    I am supposed to use for this.

    P.S. I am too new to java

    Regards,
    GSA
    GSA, Nov 19, 2010
    #1
    1. Advertising

  2. On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:

    > Hi,
    > I want to convert FQDN to IP Address. Please let me know the java api I
    > am supposed to use for this.
    >

    http://www.xbill.org/dnsjava

    > P.S. I am too new to java
    >

    Many people are new to Java, but why do you think you're too new?


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Nov 19, 2010
    #2
    1. Advertising

  3. On 19.11.2010 15:33, Martin Gregorie wrote:
    > On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:
    >
    >> Hi,
    >> I want to convert FQDN to IP Address. Please let me know the java api I
    >> am supposed to use for this.
    >>

    > http://www.xbill.org/dnsjava
    >
    >> P.S. I am too new to java
    >>

    > Many people are new to Java, but why do you think you're too new?
    >
    >


    import java.net.InetAddress;

    ...

    InetAddress addr = InetAddress.getByName(FQDN);

    --

    Q: What do they call the alphabet in Arkansas?
    A: The impossible dream.
    Donkey Hottie, Nov 19, 2010
    #3
  4. GSA

    Nigel Wade Guest

    On 19/11/10 13:33, Martin Gregorie wrote:
    > On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:
    >
    >> Hi,
    >> I want to convert FQDN to IP Address. Please let me know the java api I
    >> am supposed to use for this.
    >>

    > http://www.xbill.org/dnsjava


    That's a bit of overkill, just to resolve a hostname.

    What's wrong with InetAddress.getByName() ?

    --
    Nigel Wade
    Nigel Wade, Nov 19, 2010
    #4
  5. On Fri, 19 Nov 2010 15:06:27 +0000, Nigel Wade wrote:

    > On 19/11/10 13:33, Martin Gregorie wrote:
    >> On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:
    >>
    >>> Hi,
    >>> I want to convert FQDN to IP Address. Please let me know the java api
    >>> I am supposed to use for this.
    >>>

    >> http://www.xbill.org/dnsjava

    >
    > That's a bit of overkill, just to resolve a hostname.
    >
    > What's wrong with InetAddress.getByName() ?
    >

    Not a lot - I've always needed more than simply translating FQDN<=>IP,
    etc. such as a list of domain MX addresses and consequently go for
    dnsjava by reflex.



    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Nov 19, 2010
    #5
  6. On 19-11-2010 12:44, Martin Gregorie wrote:
    > On Fri, 19 Nov 2010 15:06:27 +0000, Nigel Wade wrote:
    >> On 19/11/10 13:33, Martin Gregorie wrote:
    >>> On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:
    >>>> I want to convert FQDN to IP Address. Please let me know the java api
    >>>> I am supposed to use for this.
    >>>>
    >>> http://www.xbill.org/dnsjava

    >>
    >> That's a bit of overkill, just to resolve a hostname.
    >>
    >> What's wrong with InetAddress.getByName() ?
    >>

    > Not a lot - I've always needed more than simply translating FQDN<=>IP,
    > etc. such as a list of domain MX addresses and consequently go for
    > dnsjava by reflex.


    Given that OP claims to be new to Java, then the simple
    solution sounds as a better fit.

    Arne
    Arne Vajhøj, Nov 19, 2010
    #6
  7. GSA

    Roedy Green Guest

    On Fri, 19 Nov 2010 03:06:50 -0800 (PST), GSA <>
    wrote, quoted or indirectly quoted someone who said :

    >I want to convert FQDN to IP Address. Please let me know the java api
    >I am supposed to use for this


    I don't know what an FQDN is, but you can convert domain names to IPs.
    See http://mindprod.com/jgloss/ip.html
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    If you give your kitchen floor a quick steam mop every few days, you will find you never have to get out buckets and brushes for deep cleaning. Similary, if you keep your code tidy, refactoring as you go, you probably won't need major rewrites.
    Roedy Green, Nov 20, 2010
    #7
  8. GSA

    Arne Vajhøj Guest

    On 19-11-2010 19:13, Roedy Green wrote:
    > On Fri, 19 Nov 2010 03:06:50 -0800 (PST), GSA<>
    > wrote, quoted or indirectly quoted someone who said :
    >> I want to convert FQDN to IP Address. Please let me know the java api
    >> I am supposed to use for this

    >
    > I don't know what an FQDN is,


    And you have not heard about Google or Wikipedia??

    Arne
    Arne Vajhøj, Nov 20, 2010
    #8
  9. On Fri, 19 Nov 2010 16:02:14 -0500, Arne Vajhøj wrote:

    > On 19-11-2010 12:44, Martin Gregorie wrote:
    >> On Fri, 19 Nov 2010 15:06:27 +0000, Nigel Wade wrote:
    >>> On 19/11/10 13:33, Martin Gregorie wrote:
    >>>> On Fri, 19 Nov 2010 03:06:50 -0800, GSA wrote:
    >>>>> I want to convert FQDN to IP Address. Please let me know the java
    >>>>> api I am supposed to use for this.
    >>>>>
    >>>> http://www.xbill.org/dnsjava
    >>>
    >>> That's a bit of overkill, just to resolve a hostname.
    >>>
    >>> What's wrong with InetAddress.getByName() ?
    >>>

    >> Not a lot - I've always needed more than simply translating FQDN<=>IP,
    >> etc. such as a list of domain MX addresses and consequently go for
    >> dnsjava by reflex.

    >
    > Given that OP claims to be new to Java, then the simple solution sounds
    > as a better fit.
    >

    Fair comment.


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Nov 20, 2010
    #9
  10. GSA

    Roedy Green Guest

    On Fri, 19 Nov 2010 16:13:26 -0800, Roedy Green
    <> wrote, quoted or indirectly quoted
    someone who said :

    >I don't know what an FQDN is


    see http://mindprod.com/jgloss/fqdn.html

    Fully Qualified Domain Name.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    If you give your kitchen floor a quick steam mop every few days, you will find you never have to get out buckets and brushes for deep cleaning. Similary, if you keep your code tidy, refactoring as you go, you probably won't need major rewrites.
    Roedy Green, Nov 21, 2010
    #10
  11. GSA

    GSA Guest

    On Nov 21, 9:40 am, Roedy Green <>
    wrote:
    > On Fri, 19 Nov 2010 16:13:26 -0800, Roedy Green
    > <> wrote, quoted or indirectly quoted
    > someone who said :
    >
    > >I don't know what an FQDN is

    >
    > seehttp://mindprod.com/jgloss/fqdn.html
    >
    > Fully Qualified Domain Name.
    > --
    > Roedy Green Canadian Mind Productshttp://mindprod.com
    >
    > If you give your kitchen floor a quick steam mop every few days, you will find you never have to get out buckets and brushes for deep cleaning. Similary, if you keep your code tidy, refactoring as you go, you probably won't need major rewrites.




    Thanks all!
    I said am too new to java as I have never even seen java code and now
    am actually supposed to do this FQDN to IP, straight shot. I dont even
    have much time to learn.
    GSA, Nov 22, 2010
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ThunderMusic
    Replies:
    0
    Views:
    521
    ThunderMusic
    Jan 3, 2006
  2. rh0dium
    Replies:
    2
    Views:
    273
    Mike Meyer
    Sep 21, 2005
  3. Scott
    Replies:
    8
    Views:
    1,459
    Scott_lotus
    Sep 7, 2009
  4. Stu Carter

    IIS and FQDN authentication confusion

    Stu Carter, Oct 11, 2005, in forum: ASP .Net Security
    Replies:
    6
    Views:
    550
    Stu Carter
    Oct 12, 2005
  5. Steven Simpson
    Replies:
    0
    Views:
    707
    Steven Simpson
    Feb 6, 2012
Loading...

Share This Page