Setting up Eclipse as your IDE for LCLS 

1) Create an eclipse workspace directory (ie ~myaccount/workspace) in your afs account dir. If you are low on your afs quota (fs listquota), you may have to ask for more afs space. 2)

2)  Establish your linux shell environment.
Operate from the bash shell.
The following lines can be placed in your .bashrc file:
#################################
# set up development environment
#################################
case $HOSTNAME in
testfac-[a-z]*)
#    export EPICS_VER=3-14-12
    source /afs/slac/g/acctest/tools/script/ENVS_acctest.bash
    echo "Environment for Test Facility "
    ;;
*)
    source /afs/slac/g/lcls/tools/script/ENVS.bash
    echo "LCLS Development Environment is set"
    ;;
esac

The following lines can be placed in your .bashrc file to connect to Oracle Wallet:

export ORACLE_HOME=/afs/slac/g/lcls/package/oracle/product/11.1.0.6/client
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
 

Note: You can run your own version of eclipse OR log on to lcls-dev2 and use the system wide eclipse IDE.

To run your own version, add a line as shown below as an example, where the user version of eclipse is installed in the scratch dir:

alias eclipse='/scratch/eclipse37/eclipse/eclipse -vm /afs/slac/g/lcls/package/java/jdk1.6.0_11/bin'

3) Once the above .bashrc lines have been executed, from a linux workstation, type:
> eclipse
You'll need to do a one-time setup of CVS. Open the "CVS Repository Exploring" perspective (select Window -> Open Perspective -> CVS Repository Exploring).
Right-click in the "CVS Repositories" view at the left (empty white space), and select New -> Repository Location.
Supply the following values:
Host:            localhost  (use "mcclogin" here when setting up on production)
Repository path: /afs/slac/g/lcls/cvs
User:            [your AFS user name]
Password:        [****]
Connection type: extssh    // note this is different than what Chris recommends...T
Leave the "Use default port" option selected.
Now you can find and check out various repositories. For example, you can explore the repository by expanding HEAD -> physics -> xal4lcls 
Right click on xal4lcls and select "Check out".
 

4) Once you have checked out a repository, To Project | Properties | Java Build Path | Libraries tab, press "Add External Jars" and navigate to include xal.jar, aida.jar, except.jar, err.jar, OB*.jar, as necessary for your particular project.
 

5) Setup Run Dialog.
Open Run | Open Run Dialog | Java Application. If you do not already have a configuration for your project, right click on Java Application and select New. Type in a name appropriate for your project if this is the first time.  If using AIDA, to the VM arguments on Arguments tab (Run | Open Run Dialog | Arguments - VM arguments), for development add:
-Xbootclasspath/p:/afs/slac.stanford.edu/package/iona/orbacus/JOB-4.2.2/lib/OB.jar -DAIDA_DATABASE_USERID=AIDAPROD -DAIDA_NAMESERVER_IOR_URL=http://www.slac.stanford.edu/grp/cd/soft/slaconly/aida/NameServerPROD.ior -Xmx256M -XX:MaxPermSize=256M
For production (running from softegr@lcls-builder, or equiv) add :
-Xbootclasspath/p:/afs/slac.stanford.edu/package/iona/orbacus/JOB-4.2.2/lib/OB.jar -DAIDA_DATABASE_USERID=AIDAPROD -DAIDA_NAMESERVER_IOR_URL=http://mccas0.slac.stanford.edu/aida/NameServerPROD.ior -Xmx256M -XX:MaxPermSize=256M

6) Oracle Wallet setup

  • No labels