Here I attached two scripts that might help you working with jar files.

Have you tried to verify that a Class must exists in a lib directory that has few dozens jar files? For example I read from a forum that there is a ServerInfo.properties inside one of tomcat jar, so I run this:
$ scala searchjar.scala ServerInfo /opt/tomcat6/lib
/opt/tomcat6/lib/catalina.jar org/apache/catalina/util/ServerInfo.class
/opt/tomcat6/lib/catalina.jar org/apache/catalina/util/ServerInfo.properties
The script can walk over one or more directory and search all jar files for you.

The second thing I do once a while is I want to see the content of a text inside the jar. For the example above, I can run my second script like this:
$ scala displayjar.scala /opt/tomcat6/lib/catalina.jar org/apache/catalina/util/ServerInfo.properties
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

server.info=Apache Tomcat/6.0.18
server.number=6.0.18.0
server.built=Jul 22 2008 02:00:36
You can even run the displayjar.scala with just a jar file, and it default to print out the Manifest file content.

Hope these scripts are useful to you.

Views: 49

Attachments:

Happy 10th year, JCertif!

Notes

Welcome to Codetown!

Codetown is a social network. It's got blogs, forums, groups, personal pages and more! You might think of Codetown as a funky camper van with lots of compartments for your stuff and a great multimedia system, too! Best of all, Codetown has room for all of your friends.

When you create a profile for yourself you get a personal page automatically. That's where you can be creative and do your own thing. People who want to get to know you will click on your name or picture and…
Continue

Created by Michael Levin Dec 18, 2008 at 6:56pm. Last updated by Michael Levin May 4, 2018.

Looking for Jobs or Staff?

Check out the Codetown Jobs group.

 

Enjoy the site? Support Codetown with your donation.



InfoQ Reading List

TanStack Start: A New Meta Framework Powered By React Or SolidJS

Introducing TanStack Start v1—a revolutionary full-stack framework for React and Solid applications. Built on TanStack Router and Vite, it offers type-safe APIs, streaming SSR, and universal deployment. Optimized for performance and flexibility, TanStack Start presents a compelling alternative to Next.js, catering to modern development needs with seamless integration and incremental adoption.

By Daniel Curtis

Grails 7.0, Now Under the Apache Software Foundation, Delivers Enhancements for Micronaut and GORM

The release of Apache Grails 7.0.0 delivers notable changes such as: the ability to disable Micronaut auto configuration through the Grails plugin; improved reproducibility with implementations of GORM services; and a temporary removal of the GORM for Neo4J until it is compatible with Grails 7.0 or 8.0. InfoQ spoke to Søren Berg Glasius and James Fredley about this release.

By Michael Redlich

Android GenAI Prompt API Enables Natural Language Requests with Gemini Nano

The ML Kit GenAI Prompt API, now available in alpha, enables Android developers to send natural language and multimodal requests to Gemini Nano running on-device, extending the text summarization and image description capabilities introduced with the initial GenAI release.

By Sergio De Simone

Inside Uber’s Pinot Query Overhaul: Simplifying Layers and Improving Observability

Uber rebuilt its Apache Pinot query architecture, replacing the Presto-based Neutrino system with a lightweight proxy called Cellar and Pinot’s Multi-Stage Engine Lite Mode. The redesign simplifies SQL execution, improves resource management, and ensures predictable performance for large-scale analytics workloads.

By Leela Kumili

Grafana and GitLab Introduce Serverless CI/CD Observability Integration

In a move to streamline development workflows, Daniel Fritzgerald of GrafanaLabs has published a new open-source solution that links GitLab CI/CD events into Grafana's observability stack via a serverless architecture.

By Craig Risi

© 2025   Created by Michael Levin.   Powered by

Badges  |  Report an Issue  |  Terms of Service