[jcifs] UnknownHostException
Bruce Altner
baltner at hq.nasa.gov
Tue Nov 20 09:22:36 EST 2001
Greetings:
I am trying to get a list of host machines within a workgroup using
SmbFile.list(url) with a url specified this way:
String url = "smb://"+domain;
where my domain (workgroup) is specified externally, e.g., from the command
line. When I do this, however, I get
an UnknownHostException from jcifs-0.6b (see below). Does that mean it is
interpreting the workgroup name as a host name?
The url syntax for returning a list of hosts in a workgroup and the list of
shares on a host is the same so in this case it must think I'm asking for
shares and can't find the host but I'm asking for hosts by specifying the
domain. What am I missing? Is it something I have to specify with
jcifs.Config.setProperty?
Thanks,
Bruce
Exception.getMessage() returns: HQIRMS
Exception.printStackTrace() returns:
java.net.UnknownHostException: HQIRMS
at jcifs.UniAddress.getByName(UniAddress.java:227)
at jcifs.smb.SmbURL.parseSmbURL(SmbURL.java:72)
at jcifs.smb.SmbFile.<init>(SmbFile.java:368)
at jcifs.smb.SmbFile.<init>(SmbFile.java:321)
at ListHosts.main(ListHosts.java:21)
________________________________________________________________
"It's a magical world, Hobbes, ol' buddy...let's go exploring!" ---Calvin
Phone: 202-651-8553
Pager Email:8273479 at skytel.com
More information about the jcifs
mailing list