Please note:The SCons wiki is in read-only mode due to ongoing spam/DoS issues. Also, new account creation is currently disabled. We are looking into alternative wiki hosts.

Java-Build-Run, classpath made by recursively walking through the directories.

The code compiles and runs java files.

The project attached project-java-build-run.zip consists of a few directories, src, bin, lib, tools. Three main-code files, SConstruct, run.py, config.py. The functionality of the three files is explained below.


$ python tools/scons/scons-local-0.98.4/scons.py buildresource=src/somecompany/HiSCons.java

this will build the HiSCons.java and put the resulting class file in bin/com/somecompany/HiSCons.class.

The classpath consists of all the files in dirs/subdirs of lib, and files in src.

Whole src directory is build, if you don't specify buildresource parameter or buildresource=src.


$ python run.py [--javaargs] src/com/somecompany/HiSCons.java.

If the class file needs input parameters to run, you can specify --javaargs, and it will prompt you for parameters.



The code is self explanatory, and comments are added as and when needed. It's been tested, on ubuntu, should work well on windows, except that at some points the path separator is of posix systems, e.g. src/com/somecompany/HiSCons.java instead of src\com\somecompany\HiSCons.java.

-- Regards, Babar Abbas, abbas.babar@gmail.com

javabuildrun (last edited 2008-07-21 21:41:24 by BabarAbbas)