nodyn / examples Goto Github PK
View Code? Open in Web Editor NEWVarious NPM module examples using nodyn
Various NPM module examples using nodyn
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.