Coder Social home page Coder Social logo

jfind's Introduction

jfind

Find utility for java classes. Currently works for files compiled with Java 6 compatibility. I would like to add compatibility up through 8 (and some other features), but haven't had time, and I figured this might be useful, so here it is.

Created by: Jason D. Woodrich, https://github.com/jwoodrich/jfind

Usage

usage: jfind path resource-name

The resource-name can be a full package/class name, such as org.slf4j.Logger, or can include wildcards, such as 'org.slf4j.*' or '*.Logger'.

When jfind encounters a jar, war, or ear, it will decompress it (and compressed contents) to a temporary location and continue the search.

No guarantees are made about this utility. It's something I created for troubleshooting with the hope that it would be faster than the shell scripts I used previously.

Examples:

To find if/where SLF4J was distributed as part of a popular application server, potentially leading to classpath and versioning problems:

$ jfind Middleware/wlserver org.slf4j.Logger

To determine if a war contains any Apache dependencies: $ jfind mywar.war 'org.apache.\*'

To find a class that I've forgotten the package name of: $ jfind . '\*.MyClass'

Required Libraries

RHEL/CentOS based

The following packages should be installed on the build system: gcc, make, zlib-devel, libzip-devel Systems that run jfind will require zlib and libzip, though doing a static build can eliminate the need for libzip (see section on static linking).

Debian based

The following packages should be installed on the build system: build-essentials, libzip, libzip-dev, Systems that run jfind will require libzip and zlib1g.

Build instructions

This is a simple application that uses dynamic linking by default. Some environments will not have libzip, and it may be easier to compile with static linking than it is to get libzip installed. Instructions for both are provided.

Dynamic linking:

make clean; make

Static linking on Debian based systems:

make clean; make static-deb

Static linking on other systems:

It seems most system have libz.so by default, so there isn't much need to statically link that. libzip is another story, and as previously mentioned, non-technical restrictions can impose a problem for getting libzip loaded. If this is your story, I empathize, and encourage you to do the following.

  1. Grab the source for libzip from http://www.nih.at/libzip/ and extract it somewhere.
  2. Build libzip from its source root (./configure && make)
  3. Copy libz.a to the jfind build directory (cp lib/.libs/libzip.a ~/path/to/jfind/)
  4. Build jfind from its source root: make clean; make semi-static

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.