Welcome to OJ

The next generation of preprocessor mechanism for Java
or the software formerly known as OpenJava
Last Modified on 2007 Oct. 14

Welcome...

OJ is an extensible language based on Java(TM). The OJ MOP (Metaobject Protocol) is the extension interface of the language. Through the MOP, the programmers can customize the language to implement a new language mechanism. OJ helps people who want to develop better Java libraries, that is, easy-to-use and efficient ones. It also helps people who are developing their own extended Java languages. OJ can also be regarded as a toolkit for constructing a Java preprocessor.

The special feature of the OJ MOP is its class metaobject API, through which programmers can handle source code as object oriented language constructs. i.e. classes, methods, fields, .. Though its translation is performed at compile-time, interfaces are similar to Java Reflection API at runtime and easy to use for high-level translations. For instance, getting information about methods, adding methods, modifying methods and so on are easier.

It is fully written in Java compatible to JDK 1.1, so it can be run on any platform which supports Java Virtual Machine of JDK 1.1 and Java2. And, the generated codes are written in regular Java language, so the user's products can be run on any platform which supports regular JVM.

News...

  • The name of this software was changed because the project was requested to choose a more appropriate name by Sun Microsystems Inc. Please call this softwre "OJ" from now on. (Oct 14, 2007) new
  • The bug that the parser rejected an instance allocation of anonymous class when it is with arguments is fixed. (Aug 4, 2002)
  • Now metaclasses can be bound to member (inner) classes. Caller-side syntax extension (type suffix) does not work in some case for inner classes. Separated meta-binding configuration is enhanced to allow use of wild card "*" and "-" for specifying base classes. (Nov 17, 2001)

Availability...

OJ 1.1 (build 20020804) is now available (Aug 4, 2002). new

And some documents are available online though they are included in the downloadable packages.

Additionally, if you need, OJ 0.2.x (old simple version) is still available from Download Page.

CVS server for the latest source code of OJ is available. new
Try to login our CVS authentication server:

cvs -d:pserver:anonymous@cvs.openjava.sourceforge.net:/cvsroot/openjava login
and check out the module
cvs -z3 -d:pserver:anonymous@cvs.openjava.sourceforge.net:/cvsroot/openjava co OpenJava_1.1

Mailing List...

Visit SourceForge mailing list at: http://sourceforge.net/mail/?group_id=48357

Publications...

History...

  • The bug that the parser rejected an instance allocation of anonymous class when it is with arguments is fixed. (Build 20020804) new
  • Now metaclasses can be bound to member (inner) classes. Caller-side syntax extension (type suffix) does not work in some case for inner classes. Separated meta-binding configuration is enhanced to allow use of wild card "*" and "-" for specifying base classes. (Build 20011117)
  • Environment-conscious customized-suffixes are now enabled. A static method getDeclSuffix(Environment,String) can be declared in OJClass subclasses to make use of it. (Build 20010425)
  • A bug of reporting NoSuchMemberException even for accessible innerclass's or outerclass's member is fixed. The class NullCompiler for people who want not to generate bytecode is added. (Build 20001010)
  • A bug in parsing an array-typed member fields declaration is fixed. Declarations in a certain kind of syntax style was wrongly reconized. (Build 20000905)
  • The class openjava.ptree.util.EvaluationShuttle is implemented completely. Some performance tuning of translation at caller-side. (Build 20000627)
  • The bug of OJClass.isAssignableFrom() for array types is fixed. (Build 20000509)
  • A bug in parsing some anonymous classes are fixed. A compiler option to turn off caller-side translation is added. (Build 20000124)
  • OJClass.addClass(), OJConstructor.setExceptions() OJConstructor.addException() are added. A bug in SelfAccess.constantSuper() is fixed. (Build 19990626)
  • The bug to fail to write a simple constructor is fixed. (Build 19990528).
  • Some bugs are fixed. (Build 19990527)
  • A few tutorials are added. (Build 19990525)
  • Some exceptions thrown in the API are changed to be convenient. ojc.exe for Windows95/98/NT platform without ksh is included. (Build 19990520)
  • Some comments for OJClass are partialy added. (Build 19990513)
  • Some lacks in the API of OJClass are supplemented. (Build 199990508)
  • Bugs in partial parser are fixed. (Build 199990507)
  • Bugs around innerclasses are fixed. (Build 19990505)
  • The first OJ 1.0 alpha is released. (Build 19990430)

Related Work...

We are developing other reflective systems for C++ and Java.

OpenC++

An extensible C++ preprocessor based on compile-time reflection.

Javassist

A class library for editing bytecodes in Java; it enables Java programs to define a new class at runtime and to modify a class file when the JVM loads it. Unlike other similar systems, Javassist is based on reflection and hence it provides higher-level abstraction.


Michiaki Tatsubori
SourceForge Logo
Copyright (C) 1997-2002 by Michiaki Tatsubori.
Java(TM) is a trademark of Sun Microsystems, Inc.