You want to receive CAN data using the socket CAN - Candump on Linux and send it to the server through the socket client code (java).
How do I