I'm using jenkins to build my projects and i can't get the hostname with java
According to this java doc I wrote the follow lines
System.out.println(System.getenv("MACHINE"));
System.out.println(System.getenv("HOSTNAME"));
These are environment variables. BUt the output on build is:
null
null
What I'm doing wrong?