How to specify the IP when multi networkcard

i’m teacher and use processing in teaching
i ve 2 networks cards in the computer of the student. so i have 2 ipadresse. (ethernet and wlan)
how to specify the second adresse ip in : s = new Server(this, 8080);
i can’t set for exemple s = new Server(this, 8080,“”);
because it will only works on one computer. I want it will work on any computer of my classroom
i have to set in s = new Server(this, 8080); the second ip adresse for the app works
thanks a lot
ps : sorry for the writting, i’m french

thanks to chatgpt i have a solution to implement.

import java.util.

void setup() {
size(400, 200);
try {
Enumeration interfaces = NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
NetworkInterface iface = interfaces.nextElement();
if (!iface.isLoopback() && iface.isUp()) {
Enumeration addresses = iface.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress addr = addresses.nextElement();
println("Interface: " + iface.getName() + ", IP: " + addr.getHostAddress());
catch (SocketException e) {

with addr.getHostAddress(), i have the IP of the computer