There is a java server running with ServerSocket that handles connections. In new separate streams. There is a client (Android application) that "knocks" on the desired port of the server.

The question is how to place the server on a local tomcat, to test the client using a real device via usb?

upd: and if there is a computer without a network / Wi-Fi / Internet .. you need to test this serv and client using a real android device connected in debug mode via usb .. Q: what address and port then knock on the client ??

  • Since the server is already working, why move it somewhere? You can test through anything. Although through a self-written client, the main thing is to use the correct algorithm so that the server understands the client and receives the packet. - And
  • I start the server from the IDE and everything works, but how can I make it work without an IDE? Or rather, if I launch it in the IDE just as a java application, then everything is normal, it listens to the port, etc. Tomkat, then nothing works, only in the browser opens index.jsp, which I have an empty server .. like javaportal.ru/java/articles/ClientServer.html - Ivan Chagarin
  • To start the server in standby mode, if in windows, make a .bat file and register in it all the necessary commands and add an import of the server’s main class. If in nix , then any * .sh is an analogue of bat. - And
  • and if there is a computer without a network / wifi / internet .. on it you need to test this serv and client using a real android device connected in debug mode via usb .. Q: what address and port then knock on the client ?? - Ivan Chagarin
  • The port is the one you are listening to the socket server. And the IP-address is not visible in ipconfig? - Nofate ♦

0