I have a message sending program from server to client which is working inside adempiere. Here I have to give supply port: 8080 dynamically, ie. port must not be hardcoded. Now I am hard coding port 8080 at serversocket and socket
Server
ServerSocket srvr = new ServerSocket(8080, 1, InetAddress.getByName(mSession.getRemote_Addr()));
Client
Socket skt = new Socket(ip.getHostAddress(), 8080);
Please suggest a method rebel to this hard coding. Please help me.