ERights Home download / 0-8-32 
Back to: E 0.8.32e: Building on Unixoids On to: E 0.8.32e: Installing "purej"

Developing E 0.8.32e in an IDE


 

Installing a Development Environment

See the Dependencies section for information on obtaining appropriate versions of a JDK, the Cygwin environment, the BYacc/J parser generator, and the zipping tools.

The E Source Distribution

For Windows users, we recommend downloading the zip of E source distribution.

Compilation Notes

There are still some deprecated methods used in this release. You can safely ignore these warnings for now.

Building from Makefiles

To build the release, cd to the e/src directory and type make. Be sure that "cygwin/bin" is on your PATH ahead of Windows directories, like "C:/WINDOWS/COMMAND". In particular, some have had problems finding the wrong "make.exe" and "find.exe". Be sure the version of both of these found on your PATH are the ones in "cygwin/bin".

This will not remake the parsers. If you wish to do so, set the environment variable "MAKE_PARSERS" to "true" and before running make. If this doesn't work, see BYacc/Java Dependencies.

If you have any troubles building E, check out the new documentation on Environment Variables.

Building in a Java IDE

E itself is a pure Java program. If you don't need to rebuild the installation tools, you can happily develop E using a Java-only development environment, such as Symantec's Visual Cafe (>= 4.1 Standard Edition). For concreteness, and because it's what I use, I'll explain how to build a Cafe project for E, but users of other development environments should easily see how to do likewise in their system. The following instructions assume that you unpack your sources into "d:/e/src", and that you install into "c:/Program Files/erights.org".

To start with, create a "New Project". For a project type, select "Empty Project" since we don't want it generating new source files for us. Select "Project Options". Under the "Project" tab, deselect "Enable RAD for New Files" since this is needless overhead for us. The "Project Type" should be "Application - A program that requires a java.exe to run".

For the "Main Class" enter "org.erights.e.elang.interp.Rune" -- the class whose main() is the top of the E interpreter. Your command line arguments string should be

"-De.home=c:/Program Files/erights.org" "d:/e/src/esrc/scripts/elmer.e"

Elmer is a good way to test each new build of E.

On the "Compiler" tab, we recommend deselecting "Show command line", but salt to taste.

On the "Directories" tab, for "Show directories for", first select "Input class files". This is where you enter the equivalent of the CLASSPATH. You should enter the following in this order:

...these directories for these reasons
d:\e\src\esrc
For the *.emaker files
d:\e\src\safej
The *.safej files for taming the Java API
d:\e\src\bin\resources
Where binary resources, such as icons, are found.
d:\e\classes
Where compiled java goes

 

For "Output files", "Output directory", enter "d:\e\classes". This is where Cafe's compiler will place the *.class files.

Now we need to suck all the e\src\jsrc\*.java files into the project. Right click in the Project pane and select "Insert files". Navigate to the directory "e\src\jsrc", select "subfolders", click on "Add All", and then click on "Ok". Wait while it adds all these files to your project. Once it's done, be sure to remember to save your project or Save All.

Finally, on the "Project" menu, select "Run in Debugger". Hopefully, after everything successfully compiles, you'll see an Elmer window. You are now running Elmer under the Cafe debugger. Have fun!

Building in Eclipse

The following notes on building E in Eclipse are from Darius Bacon.

File->New Project
select project type Java

In the project dialog, set:

project name: E
contents directory: d:\e\src\

source folders on build path:
E/jsrc (automatically there)

libraries on build path: (via Add Class Folder...)
E/esrc
E/safej
E/bin/resources

libraries on build path: (via Add Jars...)
E/bin/win32/swt.jar

default output folder:
E/classes

Once the project is set up, do:
Run... Java Application
with Main Class: org.erights.e.elang.interp.Rune
and the interactive E '?' prompt should come up in a pane inside the
IDE after a few moments.

 
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
ERights Home download / 0-8-32 
Back to: E 0.8.32e: Building on Unixoids On to: E 0.8.32e: Installing "purej"
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign