Git Product home page Git Product logo

diswebgateway's People

Contributors

leif81 avatar mcgredonps avatar saylesc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

diswebgateway's Issues

dis.SetDataPdu Usage

Any chance you can provide an example of using dis.SetDataPdu with some variable data records.

GraalVM Nashorn Engine does not work under ant run

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

Docker Portability

I have an instance of this running in a Docker container. I modified the src in Configuration.java in my copy so that the ports are configurable. Maybe this is something you could add or allow me to submit a PR if it is useful to others? Thanks.

Here's the gist:

String webserverPort = settings.getProperty("webserverPort");
String httpsWebserverPort= settings.getProperty("httpsWebserverPort");

// Overrides the default ports if the ENV VARS exist
if ( System.getenv("HTTP_WEBSERVER_PORT") != null )
{
   webserverPort = System.getenv("HTTP_WEBSERVER_PORT");
}
if ( System.getenv("HTTPS_WEBSERVER_PORT") != null )
{
   httpsWebserverPort = System.getenv("HTTPS_WEBSERVER_PORT");
}

HTTP_WEBSERVER_PORT = Integer.parseInt(webserverPort);
HTTPS_WEBSERVER_PORT = Integer.parseInt(httpsWebserverPort);](url)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.