Giter VIP home page Giter VIP logo

examples's Issues

underscore example doesn't work with nation and dynjs

Hello,

Nashorn

»  jrunscript app.js
script error in file app.js : ReferenceError: "require" is not defined in app.js at line number 1

»  java -version
java version "1.8.0_40-ea"
Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

dynjs

exec /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin/java -classpath /Users/apple/Downloads/dynjs-0.3.0/dynjs.jar -Ddynjs.home=/Users/apple/Downloads/dynjs-0.3.0 org.dynjs.cli.Main app.js
Exception in thread "main" org.dynjs.exception.ThrowException: Error: cannot load module underscore
    at <global>.<native function: require>(org/dynjs/runtime/builtins/Require.java:0)
    at <global>.<eval>(app.js:1)
    at org.dynjs.runtime.builtins.Require.call(Require.java:161)
    at org.dynjs.runtime.AbstractNativeFunction.call(AbstractNativeFunction.java:67)
    at org.dynjs.runtime.ExecutionContext.call(ExecutionContext.java:203)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:599)
    at org.projectodd.rephract.LinkPlan.linkInvocation(LinkPlan.java:186)
    at org.dynjs.parser.ast.FunctionCallExpression.interpret(FunctionCallExpression.java:113)
    at org.dynjs.parser.ast.VariableDeclaration.interpret(VariableDeclaration.java:61)
    at org.dynjs.parser.ast.VariableStatement.interpret(VariableStatement.java:87)
    at org.dynjs.parser.ast.BlockStatement.interpret(BlockStatement.java:150)
    at org.dynjs.runtime.interp.InterpretedBasicBlock.call(InterpretedBasicBlock.java:29)
    at org.dynjs.runtime.wrapper.JavascriptProgram.execute(JavascriptProgram.java:36)
    at org.dynjs.runtime.ExecutionContext.execute(ExecutionContext.java:168)
    at org.dynjs.runtime.Runner.execute(Runner.java:93)
    at org.dynjs.cli.Main.executeRunner(Main.java:119)
    at org.dynjs.cli.Main.executeFile(Main.java:149)
    at org.dynjs.cli.Main.run(Main.java:101)
    at org.dynjs.cli.Main.main(Main.java:48)

p.s. adding

load('http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js');

fixes nashorn execution.

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.