You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

Hacking on JAS3

Tools

Building JAS3 from source requires Apache Ant.

wget http://apache.oregonstate.edu/ant/binaries/apache-ant-1.6.5-bin.zip
unzip apache-ant-1.6.5-bin.zip

Building

Obtaining the Source

JAS3

CVS Instructions

CVS checkout command.

cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/jas co jas3

FreeHep

Much of JAS3's functionality is found in the freehep package.

CVS Instructions

CVS checkout command.

setenv CVSROOT :pserver:anoncvs@cvs.freehep.org:/cvs/freehep
cvs login
[jascvs]
cvs co -P freehep

FreeHep Build Instructions

cd freehep
export FREEHEP=`pwd`
tools/ant

Building JAS3 from Source

Build Instructions

cd jas3
ant

Installing Freehep Dependencies

Make a file ~/jas3.properties containing the following:

FREEHEP=C:\path\to\freehep

On Windows, the path separators need to be double backslashes. (Check same for Unix???)

Now, run from JAS3:

ant extLibs

This pulls all FreeHep external library jars files into the jas3/extensions directory.

Plugins

Menus

Example of adding a File -> New -> Example Plugin command.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE MenuSystem SYSTEM "http://java.freehep.org/schemas/menus/1.0/menus.dtd">
<MenuSystem>
    <MenuBar id="mainMenu">
        <Menu name="File" mnemonic="F" location="100">
            <Menu name="New" mnemonic="N" location="50">
                <Component type="default" 
                           icon="/classpath/to/examplePluginIcon.gif" 
                           name="Example Plugin" 
                           mnemonic="E" 
                           command="ExamplePlugin" 
                           location="1200"/>
            </Menu>
        </Menu>
    </MenuBar>
</MenuSystem>
  • No labels