Skip to main content

skip to main content

developerWorks  >  Linux  >

Speeding up Java development

Jikes makes developing Java on Linux faster and easier

developerWorks
Document options

Document options requiring JavaScript are not displayed


New site feature

Check out our new article design and features. Tell us what you think.


Rate this page

Help us improve this content


Level: Introductory

Lou Grinzo (lgrinzo@stny.lrun.com), Linux Magazine columnist

01 Sep 1999

Java expert Lou Grinzo reports on Jikes, IBM's open-source command-line Java compiler, which has been integrated into the latest versions of Red Hat Linux, Debian Linux, and FreeBSD.

What two projects have breathed the most new life into the tired phrase "paradigm shift" over the last couple of years? My bet's on the one-two combination of Java and Linux. These technologies have helped change many perceptions about how we can and should use computers, and they continue to do so. It's therefore not surprising that one of the more interesting programs available from IBM is Jikes, a high-performance Java compiler that runs under Linux and other operating systems.

Jikes is a command-line Java compiler that supports the most recent version of the Java language specification, including JDK 1.2/Java 2. It translates .java source code files into fully conforming .class bytecode files. This means that it produces programs that will work with any compliant JVM, including JITs (just-in-time compilers) on any platform. Developers can literally change from their current Java compiler to Jikes without creating any compatibility concerns for their users.

Jikes advantages

You may wonder why the world needs another Java compiler, considering that Sun provides javac free with its JDK. Jikes has four advantages that make it a valuable contribution to the Linux and Java communities:

  • Open source. Anyone can freely acquire the source code to Jikes and redistribute it, possibly with modifications. (See "Getting Jikes".) This allows Jikes to reap the maximum benefit possible from the developer community, and has already resulted in Jikes being ported to several platforms. In an equally important sense of openness, the Jikes team -- which includes members of several organizations besides IBM -- is eager to accept bug reports, suggestions, and changes from the community. Open source is good, but open source from a receptive development team is better.
  • Strictly Java compatible. Jikes adheres to both The Java Language Specification and The Java Virtual Machine Specification as tightly as possible, and does not support subsets, supersets, or other variations of the language. The Jikes project FAQ describes some of the side effects of this strict language conformance, as well as links to dozens of issues the Jikes development team has raised with Sun regarding the interpretation of the specification.
  • High performance. Jikes is a high-performance compiler, making it ideal for use with larger projects. Compilation speed, like RAM and hard disk space, is one of those commodities you can't get enough of on development projects. Jikes provides noticeably higher performance for large compilations.
  • Dependency analysis. Jikes performs a dependency analysis on your code that provides two very useful features: Incremental builds and makefile generation. The incremental build feature is started by using the "++" command line option, as in: jikes ++ myprog.java

    This will compile myprog.java and other files, as needed, and leave Jikes running. You can then change myprog.java or any of the source files it depends on. Then, you simply hit enter at the command line to tell Jikes to re-check the dependencies and only recompile files as required to bring the entire project up to date. Jikes will stay in this "hit enter/rebuild" loop until you enter a "q", which tells it to terminate.

    The makefile generation feature is invoked with the +M command-line option, as in: jikes +M myprog.java

    This tells Jikes to perform full dependency checking on myprog.java and create a file that lists the dependencies for each .class file that will be created by the compiler. By default this file has the same filename as the source file, with an extension of u. For example, the dependency file for myprog.java would be myprog.u.

It's worth pointing out that Jikes is not, and is not intended to be, a complete development environment -- it is simply a command-line compiler. It shouldn't be considered a replacement for more complete tools, such as IBM's VisualAge for Java, which provides a sophisticated graphical IDE (integrated development environment) and offers the option of compiling Java to native binary code as well as .class files.



Back to top


Getting Jikes

Increasingly, one of the easiest ways to get Jikes for Linux is with Linux itself -- Jikes is part of Lorax, the beta of Red Hat Linux 6.1, and the Debian Linux and FreeBSD distributions.

Most of us will acquire Jikes as an independent package, though. Like most open-source projects, Jikes is available in both "stable" and "current" releases. The pre-built binaries are available for AIX, Linux/x86, Windows 95/NT, and Solaris/SPARC. You can also get Jikes for several other platforms, thanks to ports that have been made available by people outside IBM and the Jikes project.

The source code is available under IBM's Public License, which has recently been approved by the OSI (Open Source Initiative) as a fully compliant open source license. The open source provides access to the complete CVS development tree, as well as the source for the Jikes test suite and the parser generator used to build Jikes.

The fact that Jikes is a high-performance, highly compatible Java compiler that can be used on almost any computing platform makes it an interesting program and worth investigating for almost any Java programmer. But Jikes is also notable because it lies at the center of two events: the adoption of open source philosophy and practice by large corporations, and the continued growth of Java for Linux.



Resources



About the author

Lou Grinzo is a computer consultant, contract programmer, and technical writer who lives in the wilds of upstate New York. He is currently a columnist with Linux Magazine, and is working on several Linux programming projects. He began working with desktop computers before IBM introduced the PC, and has a 2MB RAM expansion board mounted on his office wall. He can be reached at lgrinzo@stny.lrun.com.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top