|
From: Brian W. <bwe...@xb...> - 2003-04-08 16:56:19
|
On Tue, 8 Apr 2003, cradonge wrote:
> I'm trying to use dnsjava to validate email addresses. But I've got a
> lot of problems. So I will begin by the first one: how to set my dns
> servers.
>
> This is my code:
> [code on]
>
> Lookup testl = null;
> Record[] records = null;
> try {
> testl = new Lookup(www.yahoo.com);
> records = testl.run();
> } catch (TextParseException e) {
> System.out.println(e);}
>
> [code off]
For one thing, this code won't compile, since www.yahoo.com needs to be
quoted. It also won't look for mail servers, since you don't specify a
type to the Lookup constructor.
> I've got a NumberFormatException running this code. When I try to get
> the default resolver on the lookup, I've got the same error and when I
> try to set the default resolver either. I can't find any doc on which
> system properties I have to set.
There's no reason that this should throw a NumberFormatException. Without
seeing the actual exception and code, it's impossible to know why.
Neither setting a Resolver or setting system properties should be
necessary if your system is configured correctly.
> I'm sorry , I'm new to all this and maybe my question is stupid. But be
> kind and please answer me.
You don't provide enough information for the question to be answered. If
you provide more, I'll look into it.
Brian
|