Skip to content
JZLeetCode
Go back

Java CheatSheet

Updated:

Table of contents

Open Table of contents

Context

This is a collection of useful references about java. May not be used every day but can keep as a reference.

How to find class conflict

findjar () {
  pattern=$1
  shift
  for jar in $(find $* -type f -name "*.jar")
  do
    match=`<YOUR_JAVA_PATH_HERE>/bin/jar -tvf $jar | grep $pattern`
    if [ ! -z "$match" ]
    then
      echo "Found in: $jar"
      echo "$match"
    fi
  done
}

cd / findjar org.codehaus.stax2.ri.EmptyIterator 2>/dev/null
Share this post on:

Previous Post
HackerRank Programmer Strings
Next Post
LeetCode 875 LintCode 1492 Koko Eating Bananas