def find_jar(jar_name, root_path=None):
jar_name = os.path.basename(jar_name)<EOL>root = root_path or os.getcwd()<EOL>paths = (root, os.path.join(root, "<STR_LIT>"), "<STR_LIT>")<EOL>for p in paths:<EOL><INDENT>p = os.path.join(p, jar_name)<EOL>if os.path.exists(p):<EOL><INDENT>return p<EOL><DEDENT><DEDENT>return None<EOL>
Look for the named jar in:

#. ``root_path``, if specified
#. working directory -- ``PWD``
#. ``${PWD}/build``
#. ``/usr/share/java``

Return the full path of the jar if found; else return :obj:`None`.