2

I want to connect the java program to the LSL.I do have so many sensors in SL.I want to give real world readings to these sensors by a java program i.e input from outside SL.Is it possible? If its possible then how.Please do help me.If my given information is not sufficient then do ask me and try to help me out.

Abhiz
  • 970
  • 1
  • 16
  • 36
  • 2
    Dear Abhi002, Welcome to stackoverflow, please check how to ask questions. Also you have to show us what you have tried so far. – karan Aug 04 '16 at 05:13

2 Answers2

0

The only way I know would work via requests and two-way communication and could be implemented easily with XML Remote Procedure Calls.

XML-RPC is a standard for sending Procedure Calls (e.g. function calls) to Remote systems. It sends XML data over HTTP that remote system then handles.

LSL receives XML-RPC requests and passes them to the prim specified. It may not establish this connection, but it may reply and keep two-way communication with that server. These responses seem to be able to transport the largest amount of data out of Second Life (vs. Email and HTTP Requests).

Quoted from LSL XML-RPC - Second Life Wiki, what you want is the Java-Snippet on this page.

Sascha
  • 615
  • 1
  • 9
  • 20
0

It is definitely possible. I would suggest running your Java application as a server, and having SL objects poll it in regular intervals with http_request. Or you could have your outside Java application use HTTP requests to call your SL objects, but the former is much simpler.

P.S. As Sascha said, XML-RPC is also possible and it's a bit simpler to use, but Linden Lab advises to use LSL HTTP if possible as it scales better and is more reliable.

Domchi
  • 10,705
  • 6
  • 54
  • 64