Ask coding questions

← Back to all posts
How to open a port on replit with java?
PerfectsBots (0)

Hello to all!
I have created a small java server that listens on port 0.0.0.0:25564
While there is no error, I go to the site "http://skypiea.skypiea.repl.co/" but it tells me: "Make sure your repl has a port open and is ready to receive HTTP traffic." Don't the ports work the same on replit? I'm sure the problem is not the code but the ports. Thank you very much for your answer, it will help me a lot.

Comments
hotnewtop
EpicGamer007 (1693)

Replit does not support normal servers, only http servers. The server you currently have setup will not work on replit.

PerfectsBots (0)

@EpicGamer007

Is it possible to get around this problem by using web sockets?

EpicGamer007 (1693)

@PerfectsBots websockets? Im not sure what you mean but i guess its possible. You need to set up a websocket server then find a websocket client for your client application (if its on the web, there already is a websocket connection system)