Building joeq

If you don't want to use Eclipse, you can do everything via the command line. I typically use Eclipse on Windows and emacs/shell on Linux.

Getting the source code

The first step is to get the source code. The best way is to use CVS to get the latest version from the repository. (Windows users will need to install Cygwin to run CVS.)

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/joeq co joeq_core

In addition, if you want to bootstrap joeq to run in native mode, you will also need to check out the following modules:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/joeq co joeq_native

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/joeq co joeq_x86

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/joeq co joeq_loader

Building joeq with make

The easiest way to build joeq is with the Makefile. (Again, on Windows, you will need cygwin.)

Make targets:

  • javac - compile joeq class files with javac.
  • jikes - compile joeq class files with jikes.
  • jar - make a jar file of joeq, to be used in hosted mode.
  • bootstrap - bootstrap joeq into a native object file.
  • javadoc - build the javadoc documentation.
  • clean - clean all output files.
  • veryclean - clean all files, including cached class list.
  • update - perform a cvs update.
  • commit - perform a cvs commit.
  • wc - count lines of code and print the top 5 files.

Linking the joeq object file

Bootstrapping joeq will produce an object file in COFF format (for Windows) or ELF format (for Linux). You will need to link that object file with a loader module to use it. Windows users can use either gcc (part of Cygwin) or the Microsoft Visual C++ compiler.

To build the executable version of joeq, just type "make" in the joeq_loader directory. The Makefile assumes that the object file is in ../joeq_core/jq.obj. You can set the OBJECT variable to override. The Makefile will by default try to use gcc; to use Microsoft Visual C++, type "make msvc".

The resulting executable is a standalone native version of joeq that can be used just like the Java executable. Note that the classpaths are set during the bootstrapping phase, so joeq expects to be able to find the class libraries in the same place as when you were bootstrapping.