About Jakarta (CISC474, Spring 2006)

Apache Jakarta (jakarta.apache.org) is an open source project that "offers a diverse set of open source Java solutions".

I've installed a few components of Apache Jakarta on strauss (and may install some on porsche as needed.)

If there is a component that you think would be useful for one of your projects, or that you want to explore, let me know, and I'll consider adding it.

Where to find Apache Jakarta components on Strauss

(as of 03/18/06)

Commons JXPath

The source distribution can be found in /www/htdocs/CIS/software/dist/commons-jxpath-1.2

The JAR file is in /www/htdocs/CIS/software/dist/commons-jxpath-1.2/target/commons-jxpath.jar

I had to modify the build.xml file as follows by adding source="1.4" to the compile—apparently, one of the sources uses the work "enum" as a identifier. I was compiling with the JDK1.5, which by default treats enum as a keyword. Alternatively, I could have probably edited the sources to change the name of that variable.

> diff build.xml build.xml~
Warning: missing newline at end of file build.xml
Warning: missing newline at end of file build.xml~
36c36
<     <javac destdir="${classesdir}" source="1.4" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
---
>     <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
> 


Commons Logging

If you are using libraries from the Apache Jakarta project, you may need to use the Jakarta Commons Logging API.

This is, according to the web page for the Jakarta Commons Logging project, an "an ultra-thin bridge between different logging implementations."

It solves the problem that log4j is not the only logging package out there for Java, and so if you are writing a general purpose library that needs to do its own logging, you can't know which logger your users are going to pick.

According to the quick start section of the documentation, all you should need to do to use Jakarta Commons Logging with log4j is to have both the jar file for log4j and the jar file for Jakarta Commons Logging in your path.

The jar files for Jakarta Commons Logging is in the following locations:

Commons BeanUtils

/www/htdocs/CIS/software/dist/commons-beanutils-1.7.0/commons-beanutils.jar

Commons Betwixt

This is a package for moving between JavaBeans and XML files without having to do all the low-level SAX, DOM or Digester details yourself.

/www/htdocs/CIS/software/dist/commons-betwixt-0.7/commons-betwixt-0.7.jar

Where to find Apache Jakarta components on Porsche

Commons JXPath

/porsche/cisc474/commons-jxpath-1.2/commons-jxpath-1.2.jar

Commons Logging

/porsche/cisc474/commons-logging-1.0.4/commons-logging-api.jar

Commons BeanUtils

/porsche/cisc474/commons-beanutils-1.7.0/commons-beanutils.jar

Commons Digester

/porsche/cisc474/commons-digester-1.7/commons-digester-1.7.jar

Sample Code for a .cshrc or .localenv

Note that in this sample code, when \ appears at the end of a line, it must be the very last character on that line before the newline character (to indicate that the command continues on the next line of the shell script.)

if ( -d /porsche/cisc474 ) then
  setenv JARBASE /porsche/cisc474
  foreach THIS_JAR_FILE ( \
    ${JARBASE}/commons-jxpath-1.2/commons-jxpath-1.2.jar \
    ${JARBASE}/commons-logging-1.0.4/commons-logging-api.jar \
    ${JARBASE}/commons-beanutils-1.7.0/commons-beanutils.jar \
    ${JARBASE}/commons-digester-1.7/commons-digester-1.7.jar )
   if ( -r  ${THIS_JAR_FILE}  ) then
       setenv CLASSPATH ${CLASSPATH}:${THIS_JAR_FILE}
   endif
  end
endif
	

Valid XHTML 1.1 Valid CSS!