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: 48

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

AWS Introduces Open Source Model Context Protocol Servers for ECS, EKS, and Serverless

AWS has launched open-source Model Context Protocol (MCP) servers on GitHub to supercharge AI development within Amazon ECS, EKS, and Serverless environments. These specialized tools equip developers with real-time, context-specific insights, enhancing application deployment, troubleshooting, and operational efficiency. Empower your cloud experience today!

By Steef-Jan Wiggers

Podcast: Using AI Code Generation to Migrate 20000 Tests

In this podcast, Shane Hastie, Lead Editor for Culture & Methods spoke to Sergii Gorbachov, a staff engineer at Slack, about how they successfully used AI combined with traditional coding approaches to migrate 20,000 tests in 10 months, discovering that AI alone was insufficient and required human oversight and conventional tools to work effectively.

By Sergii Gorbachov

.NET Aspire 9.3 Brings GitHub Copilot Integration and Expanded Azure Support

The .NET team has released version 9.3 of .NET Aspire, introducing updates across diagnostics, integrations, and deployment workflows. As stated in the official announcement, this release aims to improve the developer experience by integrating GitHub Copilot into the Aspire dashboard, expanding tracing capabilities, and simplifying Azure deployments.

By Almir Vuk

GitLab Adds AI Code Assistance with Self-Hosted GitLab 18 Release

GitLab has released version 18.0 of its DevSecOps platform, introducing more AI features across the Premium and Ultimate tiers. The release includes AI-native development workflows, aligning GitLab with competitors like Microsoft's GitHub Copilot and other AI-assisted coding platforms.

By Matt Saunders

Flux 2.6 GA Release and Security Advancements

The Flux project announced the availability of Flux v2.6.0. This version marks the General Availability (GA) of the Flux Open Container Initiative (OCI) Artifacts features, representing a fundamental shift in how organizations approach GitOps.

By Claudio Masolo

© 2025   Created by Michael Levin.   Powered by

Badges  |  Report an Issue  |  Terms of Service