In step 1, we start the RServe server from R. If the server is already up and running, you will see the : ##> SOCK_ERROR: bind error #48(address already in use) message.
You can remove the current RServe process by killing it at the OS level. We can also start Rserve as a daemon process from the command line by executing R CMD Rserve.
Rserve can run locally or on a remote server accessible by multiple clients. To access the remote Rserve server, provide the hostname or the IP address of the server while creating the RConnection.
In step 2, we run the SimpleGGPlot Java program. To connect to RServe from Java, we add the appropriate jars to classpath. Since we are executing the command from the javasamples folder, we add .. ...