NextGen is an efficient and compatible extension of the Java programming language with support for generic types. Unlike other extensions of Java with genericity, such as GJ and JSR-14, NextGen does not restrict the programmer from using generic types in "type-dependent" contexts, such as casts, "instanceof" tests, and "new" operations. Nevertheless, NextGen maintains full compatibility with the JVM and existing compiled binaries.
For more information on the NextGen language design and implementation, see the list of papers below.
If you are a new developer on the NextGen project, please read the NextGen Developer's Guide.
The NextGen prototype compiler and classloader, available for download from this site, provide a preliminary implementation of NextGen that may be of use for exploration and experimentation.
NextGen was developed as an extension to the GJ compiler under special license from Sun Microsystems. This same compiler was extended independently by Sun Microsystems to form the JSR-14 prototype compiler, scheduled for inclusion in J2SE 1.5. Because NextGen is upward compatible with JSR-14, it is a potential candidate for inclusion in a future version of Java.
You are free to download the NextGen jar files, and to run the class files in them, but you may not decompile them, redistribute them, or extend their functionality in any way.
THIS SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL RICE UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS SOFTWARE OR THE USE OF OR OTHER DEALINGS WITH THIS SOFTWARE.
The latest version of NextGen is nextgen-20030322-1610.
This jar file is provided as a beta release of the NextGen compiler. Note that not all features of the complete language are supported yet. Most notably, type-dependent operations on type parameters bound in polymorphic methods are not yet supported. Also, per-instantiation static fields are not yet supported.
Download
In order to run NextGen, you will need a Java SDK v1.3 or higher. Append the downloaded jar file to your classpath. Also, append all jars containing bootclasses for your SDK to your classpath, so that the compiler has object-level access to them. The location of bootclasses depends on your SDK, but all Sun SDKs place the bootclasses in jre/lib/rt.jar.
To compile a NextGen
source file with fully qualified name C.java, type:
java edu.rice.cs.nextgen.compiler.main.Main C.java
To run the main method of a public compiled class with fully qualified name
C (where C is accessible from your classpath), type:
java edu.rice.cs.nextgen.classloader.Runner C
A few notes:
java -jar
. However, this usage is not
recommended because the only classes available to the compiler will
be those inside the jar. In particular, your bootclasspath will not
be accessible, making almost all programs
uncompilable. Unfortunately, we are legally prohibited from
distributing the bootclasses of the Sun JDK (or any other JDK). We
recommend constructing shell scripts on your platform of choice to
run these programs more conveniently.
Allen, December 2000. Behold the power of parametric polymorphism
Allen, February 2003. Java
generics without the pain
Send comments, questions, and bug reports to JavaPLT.