From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Anthony Green" To: "Java@Gcc. Gnu. Org" , Subject: javascript + gcj Date: Sat, 06 Oct 2001 17:28:00 -0000 Message-id: <09c401c14ec7$9db926e0$5be6b4cd@cygnus.com> X-SW-Source: 2001-10/msg00001.html 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