• Post Reply Bookmark Topic Watch Topic
  • New Topic

Change IP Address  RSS feed

 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Any advice on this would be great,

Is there way to change my IP Address through Java code?

Thanks in Advance,

Niall
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is an easy way to change your IP address.

Your IP address is set in the configuration of your operating system, and if you're using DHCP then it's automatically assigned by the router that your computer is connected to. How the IP address is configured is a highly OS-specific thing.

Note that there's a class java.net.NetworkInterface that can give you information about the network interface(s) that are installed on your computer, but it doesn't provide a way to change the IP address of a network interface.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!