Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.net.UnknownHostException on file:// method

failed to open file file://D/:/dev/test_all.html  JavaException: java.net.UnknownHostException: D

Any ideas for why this happens?

like image 722
Vidar Kongsli Avatar asked Apr 21 '10 06:04

Vidar Kongsli


People also ask

How do you catch UnknownHostException?

The UnknownHostException can be avoided with the following checks: Valid hostname - The hostname should be double checked to make sure it does not contain any typos or whitespaces. DNS settings - The system DNS settings should be checked to ensure that the DNS server is reachable.


1 Answers

the third / is in the wrong place, the file url is contructed with file:///<path>

like image 198
Salandur Avatar answered Oct 18 '22 22:10

Salandur