[x3d-public] DISWebGateway

John Carlson yottzumm at gmail.com
Mon Feb 22 21:19:08 PST 2021


I was able to get it to work by setting JAVA_HOME and JDK_HOME as root 
before running `ant run`


I have a working gateway, web page and DIS receiver.


Congratulations to the whole open-dis team!


This is becoming less mysterious.


So.  What's next on our requirements list for multiuser X3D? Better 
avatars?  Avatar downloading from user site?  I think Gina would go for 
that, based on a a facebook post.


My first attempt was to build an LOA4 skeleton.  Mine had flat hands and 
flat feet.


Would anyone like to see my skeleton building code?


John

On 2/21/21 10:55 PM, John Carlson wrote:
> This looks useful, getting nashorn working in Java 15.
>
>
> https://quabr.com/65265629/how-to-use-nashorn-in-java-15-or-later
>
>
> Basically, you have to add a jar to your classpath it looks like!
>
>
> John
>
> On 2/21/21 10:37 PM, John Carlson wrote:
>> This code works in GraalVM.
>>
>>
>> import javax.script.ScriptEngine;
>> import javax.script.ScriptEngineManager;
>> public class Foo {
>>      static public void main(String [] args) {
>>
>>      try
>>       {
>>         ScriptEngineManager factory = new ScriptEngineManager();
>>         ScriptEngine engine = factory.getEngineByName("nashorn");
>>
>>         engine.eval("print('Hello, World')");
>>
>>       }
>>       catch(Exception e)
>>       {
>>           System.out.println(e);
>>       }
>>
>>         }
>> }
>>
>> ================================================================
>>
>> This code does not work in DISWebGateway.  Can i get a Java version # 
>> when running the run target under ant?
>>
>>
>> $ sudo ant run
>>
>> This is a Linux 5.8 system.
>>
>>
>> See below
>>
>>
>>
>> On 2/21/21 9:53 PM, John Carlson wrote:
>>> I've been trying to get open-dis' DISWebGateway running, and got the 
>>> following script issue. I think it's because OpenJDK does not use a 
>>> scripting engine like Nashorn.
>>>
>>>
>>> I will likely move to GraalVM if there are no other solutions.
>>>
>>>
>>> run:
>>>      [java] Loaded configuration properties
>>>      [java] class edu.nps.moves.gateway.Configuration
>>>      [java] SLF4J: Failed to load class 
>>> "org.slf4j.impl.StaticLoggerBinder".
>>>      [java] SLF4J: Defaulting to no-operation (NOP) logger 
>>> implementation
>>>      [java] SLF4J: See 
>>> http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
>>>      [java] Started DIS listening on UDP port 1194
>>>      [java] Configured to not use redis server
>>>      [java] Starting websocket server on TCP port 8282
>>>      [java] Starting https server on TCP port 443
>>>      [java] WebSocket Opened
>>>      [java] java.lang.NullPointerException: Cannot invoke 
>>> "javax.script.ScriptEngine.eval(String)" because "engine" is null
>>>      [java] WebSocket Closed. Code:1011 Reason:WebSocketException
>>>      [java] WebSocket Opened
>>>      [java] java.lang.NullPointerException: Cannot invoke 
>>> "javax.script.ScriptEngine.eval(String)" because "engine" is null
>>>      [java] WebSocket Closed. Code:1011 Reason:WebSocketException
>>>



More information about the x3d-public mailing list