August 19th, 2009 jasonk
Recently found an issue where all the files on the classpath existed, but one of the core classes was being selected from a JAR which it shouldn’t be. Some effort found that the execution user was unable to read the JAR (no read permissions).
The following script verified this:
IFS=:
for cp in $JAVA_HOME/jre/lib/*.jar $CLASSPATH
do
if [ -f $cp ]
then
echo “$cp found”
else
echo “$cp missing”
fi
done
Posted in Uncategorized | No Comments »
August 19th, 2009 jasonk
Following is a bash script for searching the java class path. Very easy.
#!/bin/bash
## set IFS to : so that bash will split on the : (which is the CLASSPATH delimiter)
IFS=:
## set CLASSTOFIND as your class, note that this string will be grep’d for. “.” works as a great wildcard, so it will accept “/” in the path
FILE=javax.xml.transform.TransformerFactory
## and search, remember to search JRE lib folder
for cp in $JAVA_HOME/jre/lib/*.jar $CLASSPATH
do
if [ -f $cp ]
then
echo “—- searching $cp”
jar tvf $cp | grep $FILE
fi
done
Posted in Uncategorized | No Comments »
August 2nd, 2009 jasonk
I’ve recently stumbled across TastyCupcakes.com and can highly recommend it. Amongst other things, it’s a blog which contains games to play for educating your software development team.It has a very strong agile flavour; although lots of the lessons can be used outside of a software arena.
Posted in Uncategorized | No Comments »