Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java equivalent of DOS ipconfig release / renew

 
Adam Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't not know if this is possible, but is there a way to conditionally release / renew an IP of a machine using Java? I understand that Java does not tie itself to any specific OS, but in way of testing "Out of Comms" scenarios I am looking to create a test that I can automate to alleviate the need to yank the network cable from the machine and then plug it back in.

Any thoughts would be very appreciated!

Thanks!
 
Ajay Singh
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can exec to achieve this:
 
Adam Brown
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Deal!

Thanks for the help Ajay,

Adam
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!