From: "Anthony Green" <green@redhat.com>
To: "Java@Gcc. Gnu. Org" <java@gcc.gnu.org>, <rhug-rhats@sources.redhat.com>
Subject: javascript + gcj
Date: Sat, 06 Oct 2001 17:28:00 -0000 [thread overview]
Message-ID: <09c401c14ec7$9db926e0$5be6b4cd@cygnus.com> (raw)
FYI... I've just imported the Netscape/Mozilla javascript package (rhino) into
rhug.
In addition to the main library, lib-org-mozilla.so, it will install two
programs...
js - a javascript shell
jsc - a javscript compiler for generating .class files (compilable with
gcj)
javascript is actually kind of cool. It looks quite practical as a general
scripting language because the gcj runtime loads relatively quickly. Here's a
javascript version of libjava/scripts/showval.java, for instance..
---- cut here -----------------------------------------
#!/usr/local/bin/js
ch = arguments[0].lastIndexOf ('.');
className = arguments[0].substring (0, ch);
constName = arguments[0].substring (ch + 1);
klass = java.lang.Class.forName (className);
field = klass.getField (constName);
print (constName + " = " + field.getInt (null));
---- cut here -----------------------------------------
AG
reply other threads:[~2001-10-06 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='09c401c14ec7$9db926e0$5be6b4cd@cygnus.com' \
--to=green@redhat.com \
--cc=java@gcc.gnu.org \
--cc=rhug-rhats@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).