Using joeq with Eclipse

Creating the Eclipse project

Select New Project from the File menu.

Select "Checkout Projects from CVS".

If you don't have a SourceForge account (and just want read-only anonymous source access) fill out the boxes like this, leaving the password field blank:

If you DO have a SourceForge account and want read-write access to the repository, put your SourceForge username instead of "anonymous", fill in your password and change the connection type to "extssh".

Select "Use an existing module", select "joeq_core", and click "Finish".

Switch to the Java perspective, by clicking on the "Open Perspective" button.

If you like, switch to Hierarchical Layout to make the package structure cleaner.

Bootstrapping joeq from within Eclipse

You can run the bootstrapper from within joeq. First, check out the "joeq_native" and "joeq_x86" modules, just like you did above. (New Project->Checkout Projects from CVS->...)

There is a premade Bootstrap.launch file in the joeq_native project. Assuming you have checked out the joeq_native project, the Bootstrap run target should automatically appear in the configurations section:

Note that this will take a LOT of memory to bootstrap from within Eclipse. 768M at the minimum!

Linking joeq from within Eclipse

First, you will need to install the Eclipse CDT (C Development Toolkit). You can install it through the Eclipse update manager by following the instructions here. Be sure to restart Eclipse after installing CDT!

Check out the joeq_loader module, just as you did above. The Makefile is already set up to use gcc to compile and link the loader to the joeq object file. Note that the joeq_loader compilation will fail unless you have done the bootstrapping phase and the jq.obj file is in the joeq_core/ project directory. You may need to refresh after bootstrapping to get this to work correctly.

If you are having trouble with CDT on Windows, make sure that you have Cygwin and/or mingw installed, and c:\cygwin\bin is in your PATH environment variable.

Running joeq in native mode from within Eclipse

Just like for bootstrapping, there is a premade launch file for running the joeq executable. It should automatically appear in the configurations section:

You may run into trouble where Eclipse says that the file joeq.exe is not binary. In that case, make sure that the .cdtproject file in the joeq_loader module contains:

<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>

<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>

The ELF line is so that Eclipse can parse Linux binaries; the PE line is for Windows binaries.