I want do do ipconfig on linux with exec java command.
When i do 'ls' for exemple is ok , but for root command like 'ifconfig' i have nothing .
my code : ................... cmd="ls -l\n"; try { Process p=Runtime.getRuntime().exec("/bin/sh"); OutputStream in=p.getOutputStream(); in.write(cmd.getBytes()); in.flush(); InputStream out=new BufferedInputStream(p.getInputStream()); byte[] b=new byte[1024]; int n=out.read(b); for(i=0;i<n;i++) System.out.print((char)b[i]);
} catch(Exception ex) { } .....................
I want just get MAC ADDRESS of my network device , there is another way to do that ?
Thanks.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]