I want to print the local host name, but it always prints null .. how can I get host name ?
Java Code
String hostname = System.getenv("HOSTNAME"
System.err.println("Hostname = " + hostname);
______________________________ Online fax
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'explnorg_xybrain.r.rate_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
package testing;
import java.net.*;
public class Test
{
public static void main(String[] args) throws UnknownHostException
{
System.out.println(InetAddress.getLocalHost().getHostName());
}
Nabi Muhammad SAW bersabda :” Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahui” (HR. Imam Ahmad).
..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'explnorg_xybrain.r.rate_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by