It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Bernd Kreimeier
Gamasutra
June 11, 1999

This article originally appeared in the
July, 1999 issue of:


Letters to the Editor:
Write a letter
View all letters


Features

Open Source

Content
Introduction

Talking to the Natives

Code Listing 1

Double Indirection

The Invocation API

Two Architectures

Code Listing 4

Encapsulated Native: A Magic Bullet?

For Further Info
Java for Games

Java Documentation

Tools & Products

Open Source

Sidebar
Java wraps native code in Prax War

id Adandons jave for Quake 3: Arena

Embedded Java in Vampire: The Masquerade

Java has attracted a lot of interest from the Open Source communities, despite the less than satisfying support for Java on non-Win32 platforms. It is worth noting that the JDK source is available from Sun under various licenses. If you do not intend to use a clean-room Java implementation, and instead you are considering creating a custom version of the Sun VM, it might be worth looking into the licensing details. In general, a deal with Transvirtual will probably give you more freedom at less cost.

Free clean-room implementations of Java serve well for research purposes, but are not yet ready for use. Examples include the GNU Japhar JVM at http://www.japhar.org and GNU Classpath core classes at http://www.classpath.org. Both are under the less-restrictive LGPL license and thus they are available for use in commercial products. TYA, at ftp://gonzalez.cyberus.ca/pub/Linux/java, is another interesting project.

Other source for Java examples and sources are the GNU/FSF Java repository, at http://www.gnu.org/software/java/java- software.html, the Giant Java Tree at http://www.gjt.org, and the Gamelan Repository at http://www.gamelan.com.

In particular, there is the outstanding Java port of the ANTLR parser at http://www.antlr.org, which (like Sun's JavaCC) allows you to create Java parser classes for a given grammar. If you are looking for ways to compile a different language (say, Scheme) to Java bytecode, or you're looking for readily available script interpreters, there is a comprehensive list at http://grunge.cs.tu-berlin.de/~tolk/ vmlanguages.html which might contain your language of choice. Unfortunately, tools for converting C or C++ to Java are not readily available. The C2J and C2J++ conversion tools listed cover only a fraction of the languages. Another noteworthy reference is http://java.sun.com/products/jfc/tsc/tech_topics /generic-listener/listener.html, which provides source to handle runtime-interpreted Java source.

You might be skeptical about the relevance of Open-Source solutions and third-party compilers, but remember that id Software's Quake relied on the DJGPP compiler, and that Quake 3: Arena will use a derivative of LCC (see http://www.cs.princeton.edu/software/lcc). Incidentally, such C/C++ compilers could also serve as the starting point for creating your own Virtual Machine.


Java wraps native code in Prax War


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service