[Info-vax] Access to _all_ VMS system services and library functions from
Arne Vajhøj
arne at vajhoej.dk
Tue Jul 11 19:40:45 EDT 2017
On 7/11/2017 9:12 AM, Bob Koehler wrote:
> In article <ojs1ge$1nel$1 at gioia.aioe.org>, =?UTF-8?Q?Arne_Vajh=c3=b8j?= <arne at vajhoej.dk> writes:
>> Getting rid of the string image name and function name is trivial:
>>
>> $ type itmlst2.js
>> importClass(Packages.java.lang.System);
>>
>> function printf() {
>> System.out.printf.apply(System.out, arguments);
>> }
> [...]
>
>>
>> $ jsshell itmlst2.js
>> sts=1 pid=1072 usrnam=ARNE
>>
>
> Is this hypothetical, or does such a jshell actuall exisit somewhere?
>
> I'm not in favor of JS as a repalcement of DCL, but I am curious.
Yes. It is running code - not a mock up.
jsshell is:
java -cp vmscall.jar:record.jar:rhino.jar:.
"org.mozilla.javascript.tools.shell.Main" -debug -f
vmscall.jar contain the VMS calling convention glue
record.jar is used for serializing/deserializing blocks
rhino.jar contains the JavaScript for JVM
org.mozilla.javascript.tools.shell.Main is the shell
intepreter that comes with this JavaScript implementation.
As a nice little bonu sit is possible to compile to
Java byte code as well.
$ jsc itmlst3.js
$ java -cp vmscall.jar:record.jar:rhino.jar:. "itmlst3"
sts=1 pid=1072 usrnam=ARNE
Arne
PS: JavaScript was not my first choice for scripting language either
but it turned out top be the easiest to get running.
More information about the Info-vax
mailing list