', a.get(k); } props = new java::Properties( a.b.c.d.e.f.g = 'a thru g', h.i.j.k.l.m.n = 'h thru n' ); println props; Aliasing Java static methods The capability to alias Java static methods as Judoscript functions is an important mechanism, responsible for many built-in functions. function prop for java::System.getProperty(); function now for java::System.currentTimeMillis(); function rt for java::Runtime.getRuntime(); println now(), nl; println prop('java.class.path'), nl; rt().gc(); Using Java classes as values Java classes are also object values, and can be assigned to variables or constants. const #Types = java::java.sql.Types; fields = [ 'BIT', 'TINYINT', 'SMALLINT', 'INTEGER', 'BIGINT', 'FLOAT', 'REAL', 'DOUBLE', 'NUMERIC', 'DECIMAL', 'CHAR', 'VARCHAR', 'LONGVARCHAR', 'DATE', 'TIME', 'TIMESTAMP', 'BINARY', 'VARBINARY', 'LONGVARBINARY', 'NULL', 'OTHER', 'JAVA_OBJECT', 'DISTINCT', 'STRUCT', 'ARRAY', 'BLOB', 'CLOB', 'REF' ]; println 'JDBC types in Java ', sysProperty('java.version'), ':'; for fld in fields { println fld:<13, ': ', #Types.(fld); } Extending Java classes and implementing Java interfaces It is possible to define Judoscript classes that extend Java classes or implement Java interfaces. class MyHashMap extends java::HashMap { // Test overriding an existing method int hashCode() { return super.hashCode() ^ 1; } // A new method. String[] getKeys() { arr = []; for x in this { arr.add(x); } return arr.toStringArray(); } // A new method. Object[] getValues() { arr = []; for x in values() { arr.add(x); } return arr.toObjectArray(); } } Anonymous Java interface adapters can be created and used. import java.awt.Frame; import java.awt.event.*; f = new java::Frame; f.addWindowListener( new java::WindowListener { void windowClosing(WindowEvent e) { exit 0; } } ); f.setVisible(true); Language features III: special domain supports This part of the language is what makes Judoscript unique. Each major domain support will be touched on briefly, usually with examples. JDBC scripting JDBC scripting is a central feature of Judoscript, as well as a key motivation for the language itself. It makes database operations intuitive and convenient. Below is an example that connects to database and runs some SQL statements. db::connect to 'jdbc:oracle:thin:@dbsvr:1521:dbname', 'user', 'pass'; if tableExists('EMP') { db::sql: DROP TABLE emp; } db::sql { CREATE TABLE emp(emp_no INTEGER PRIMARY KEY, first_name VARCHAR(100), // First Name last_name VARCHAR(100), // Last Name birth_date DATE, -- Birth Date salary NUMBER); -- Salary CREATE INDEX emp_fname ON emp(first_name); CREATE INDEX emp_lname ON emp(last_name); INSERT INTO emp(emp_no,first_name,last_name,birth_date,salary) VALUES( 100, 'Jim', 'Malone', to_date('1-3-1954','dd-mm-yyyy'), 86500.0); } println 'db::sql result: ', $_; disconnect(); Using stored procedures is through the db:any statement. db::any [[* CREATE PROCEDURE test_proc( param_io IN OUT NUMBER,