简体   繁体   中英

Change IP address in JavaFX

I want to be able to change the IP address of a device that is connected via LAN cable (1 to 1 connection) with a software that I create in JavaFX.

I already know what the IP address is for both devices. The device that has the software and the device (the IP to be changed) will be on the same subnet.

Is there any protocol/libraries/functions I can use to achieve this, or is this even doable?

Java (and thus JavaFX) doesn't have a method for changing a device's IP address.

If the software of the device is under your control you would need to implement it there. Be aware that your process needs to have the corresponding rights to change the device's address.

If the device you are programming is your own you can add your own software that handles the IP address change, given the constraints of the device's operating system.

However, if it is a device of another manufacturer, especially if it is a off the shelf device, it is very unlikely that you can.

Given the addition of 'a device such as a TV', many of such devices already offer a on-device method of configuring the IP. Also, many routers allow to bind a device's MAC address to a fixed IP.

However, with Java (or Python, C#, or C, or assembly), you can't. Not unless there is an API or a security bug in the device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM