![]() ![]() StringBuilder stderr = commandExecutor.getStandardErrorFromCommand() StringBuilder stdout = commandExecutor.getStandardOutputFromCommand() Then read output through: // get the output from the command Int result = commandExecutor.executeCommand() SystemCommandExecutor commandExecutor = new SystemCommandExecutor(command) Or // build my command as a list of For Unix/Linux Run the getmac and getmac /s remote_computer /u username /p password command to retrieve the mac addresses of a remote computer.īut through Java you need to use Java exec system with Java ProcessBuilder and Processįor example: ProcessBuilder pb = new ProcessBuilder("getmac").Retrieve the mac addressses for a remote computer using nbtstat command.Use ipconfig command to deal with this.To get mac addresses on the computer, Just run the command getmac to get the mac addresses. There is no direct way to get mac address from system through Java. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |