Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > FQDN to IP

Reply
Thread Tools

FQDN to IP

 
 
GSA
Guest
Posts: n/a
 
      11-19-2010
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
 
Reply With Quote
 
 
 
 
Martin Gregorie
Guest
Posts: n/a
 
      11-19-2010
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 |
 
Reply With Quote
 
 
 
 
Donkey Hottie
Guest
Posts: n/a
 
      11-19-2010
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.
 
Reply With Quote
 
Nigel Wade
Guest
Posts: n/a
 
      11-19-2010
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
 
Reply With Quote
 
Martin Gregorie
Guest
Posts: n/a
 
      11-19-2010
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 |
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      11-19-2010
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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-20-2010
On Fri, 19 Nov 2010 03:06:50 -0800 (PST), GSA <(E-Mail Removed)>
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.
 
Reply With Quote
 
Arne Vajhj
Guest
Posts: n/a
 
      11-20-2010
On 19-11-2010 19:13, Roedy Green wrote:
> On Fri, 19 Nov 2010 03:06:50 -0800 (PST), GSA<(E-Mail Removed)>
> 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


 
Reply With Quote
 
Martin Gregorie
Guest
Posts: n/a
 
      11-20-2010
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 |
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-21-2010
On Fri, 19 Nov 2010 16:13:26 -0800, Roedy Green
<(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web service showing localhost not FQDN ? Scott ASP .Net 8 09-07-2009 06:38 AM
Web pages wont load via FQDN BigAl.NZ@gmail.com Computer Support 9 02-11-2008 07:25 PM
FQDN Peter Lecki Cisco 2 01-16-2006 09:05 PM
receiving error 401.1 with FQDN Authentication. Why? ThunderMusic ASP .Net 0 01-03-2006 03:37 PM
re.search experts needed on fqdn stripping.. rh0dium Python 2 09-21-2005 02:07 AM



Advertisments