Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thufir@dur:~$
- thufir@dur:~$ java -jar NetBeansProjects/Teln/dist/Teln.jar
- dsl-mud.org
- Exception in thread "main" java.net.UnknownHostException: dsl-mud.org : Name or service not known
- at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
- at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:894)
- at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1286)
- at java.net.InetAddress.getAllByName0(InetAddress.java:1239)
- at java.net.InetAddress.getAllByName(InetAddress.java:1155)
- at java.net.InetAddress.getAllByName(InetAddress.java:1091)
- at java.net.InetAddress.getByName(InetAddress.java:1041)
- at teln.WeatherDriver.main(WeatherDriver.java:18)
- thufir@dur:~$
- thufir@dur:~$ cat NetBeansProjects/Teln/src/teln/WeatherDriver.java
- package teln;
- import java.io.IOException;
- import java.net.InetAddress;
- import java.net.SocketException;
- import java.net.UnknownHostException;
- import java.util.Properties;
- public final class WeatherDriver {
- private static Connection c;
- private static StreamReader sr;
- public static void main(String[] args) throws UnknownHostException, SocketException, IOException, InterruptedException {
- Properties props = PropertiesReader.getProps();
- String hostString = props.getProperty("host");
- System.out.println(hostString);
- InetAddress host = InetAddress.getByName(props.getProperty("host"));
- int port = Integer.parseInt(props.getProperty("port"));
- String u = props.getProperty("user");
- String p = props.getProperty("password");
- String prompt = props.getProperty("prompt");
- c = new Connection(host, port, prompt,u,p);
- sr = new StreamReader(c);
- }
- }
- thufir@dur:~$
- thufir@dur:~$
Advertisement
Add Comment
Please, Sign In to add comment