Hi,

Inline responses below..


On Wednesday 05 February 2014 04:32 AM, Bernd Eckenfels wrote:
Hello,

not sure if this is the right list, but I will post it here anyway:

a) the jdk8 documentation page has a "whats new in jdk8" section and
this section lists "jjs", however on the doc page itself only
jrunscript is mentioned:

http://download.java.net/jdk8/docs/technotes/tools/index.html#enhancements

Looks like a doc oversight. I'll notify.


b) On the jrunscript documentation page is a sentence which I do not
understand (or the content behind the link is missing):

http://download.java.net/jdk8/docs/technotes/tools/windows/jrunscript.html
#See Also
#If JavaScript is used, then before it evaluates a user defined script,
#the jrunscript command initializes certain built-in functions and
#objects. These JavaScript built-ins are documented in JsDoc-Toolkit at
#http://code.google.com/p/jsdoc-toolkit/

jrunscript runs "init.js" bundled in the tool itself. This is historical. "jjs" does not run that script.


Is this also true for nashorn, or where can I get this list?

c) this wiki page is broken:
https://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation

By "broken", do you say any information is missing? or you can't access it?


d) I guess on this page the word nashorn (or jjs/jrunscript or tools)
should be mentioned, the current scripting section more looks like the
integrated java scripting not the tools:
http://download.java.net/jdk8/docs/technotes/guides/

e) is there a documentation about a list of all built-in load()
scripts of nashorn? I have only found a list for fx: in the user guide.

Same wiki page - left panel has link to this page:

https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions

f) both jjs and jrunscript should probably add the scripting guide
homepage as a see also resource.
Scripting guide is meant for programmatic access for nashorn or any other javax.script compliant engines.
Not sure if we should include jjs and jrunscript info there.

g) jjs -h does not mention that there is a -xhelp

Options displayed by '-h' are the supported option. The options displayed by '-xhelp' (including -xhelp) are 'experimental' - may be modified/removed in future.
The actual reason why I was browsing the documentation (and I did not
find an answer) is, if there is a inspect() like method in jjs to
discover the environment? I was for example courious if there is some
JSON support in nashhorn? (or at least an load("nashorn:xxx.js") to
add?)
JSON is supported because Nashorn implements ECMAScript 5.1 spec - which includes JSON object.

    http://www.ecma-international.org/ecma-262/5.1/

As I said earlier, nashorn specific extensions are documented here:

    https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions

There is no 'inspect'. But, you can do the following in 'jjs':

jjs> Object.getOwnPropertyNames(this)

Hope this helps
-Sundar


Reply via email to