Quote:How to create a file in a home directory with help of other host username and password or IP adress?
package com.techstar.com; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; class UpDown{ public static void main(String[] args) throws UnknownHostException, IOException { String ipAddress = "192.168.15.49"; 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 = "192.168.15.38"; 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"); }}
touch ~/the_file_name_to_be_created
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)