My Java client-server program doesn't work [closed]

Solution 1:

Setup

The .ply file was placed in the same directory as the sever .jar. I did not experiment with different paths.

Server Command (Pre-Built JAR):

    java -jar dotServer-all-1.0-SNAPSHOT.jar -f example.ply

Server Address Format (Pre-Built Android Client Settings):

    192.168.2.10:8080

Issues

I was able to get this setup working. However, there were three issues:

  1. Your example (ASCII formatted) .ply file does not seem to work with the Android client for some reason. I had to download a separate (binary formatted) .ply file in order to see it in the Android client.

  2. This substitute .ply file only showed in red for me. I am not sure why it did not appear normally in the Android client but it was sufficient to verify that the server and client had a connection. Please see the screenshot of what it should look like in the notes below.

  3. The pre-built server .jar defaults to port 8080 and did not seem to honor the -p (port) parameter.

    So you need to append :8080 to the IP (e.g. 192.168.2.10:8080) in the Android client Server IP settings if you are using the current pre-built server .jar.

Android Client Server IP Settings Example Image

Notes

To confirm that the Android client is connected, you can watch the server output in the running window for that server. If the Android client is connected, when you scroll around, the server will output "Original" and "Compressed" messages in real-time regarding the data transfer taking place.

Image Of Server Output From Scrolling Through The Client Android Interface

For reference here is what the .ply file I used should have looked like:

Ply Viewer Ply File Screenshot


Software

Potree ("free open-source WebGL based point cloud renderer for large point clouds")