Hallo zusammen 
Ich habe ein java code erstellt mit dem ich Ips abfragen kann nun will ich das er am schluss eine Datei ausspuckt in der alle geprüften Ips stehen und ob sie erreicht wurden oder nicht hat irgendjemand eine idee wie man sowas machen kann ?
PS: Bin neu im java oder Programmire Bereich
Ich habe ein java code erstellt mit dem ich Ips abfragen kann nun will ich das er am schluss eine Datei ausspuckt in der alle geprüften Ips stehen und ob sie erreicht wurden oder nicht hat irgendjemand eine idee wie man sowas machen kann ?
Java:
import java.net.InetAddress;
import java.io.IOException;
import java.net.UnknownHostException;
public class HelloWorld {
public static void main(String[] args) throws UnknownHostException, IOException {
String ipAddress = "127.0.0.1";
InetAddress inet = InetAddress.getByName(ipAddress);
System.out.println("Sending Ping Request to " + ipAddress);
System.out.println(inet.isReachable(5000) ? "Host is reachable" : "Host is NOT reachable");
ipAddress = "193.196.202.6";
inet = InetAddress.getByName(ipAddress);
System.out.println("Sending Ping Request to " + ipAddress);
System.out.println(inet.isReachable(5000) ? "Host is reachable" : "Host is NOT reachable");
}
}
PS: Bin neu im java oder Programmire Bereich