Hello,
Cross posted to Linux_390 and OMVS-OE.
Is there a way to specifically search a Java class in a jar file ? The
situation is high many jar file but I want to point out the exact jar file
where the java class is present.
Regards,
Jake
---
The same Java class can be present in multiple JAR files in your class path
which may be a pain to debug. What I found helpful is to turn on class loading
tracing - add the "-XX:+TraceClassLoading" option.
This lets you know which exact location the class was loaded from.
It works in Oracle Jav
If it helps, jar files are just zip files, and you could find the jars,
read them with something like Perl¹s Archive::Zip and create a map of
classes found in the jar files.
--
Robert P. Nix | Sr IT Systems Engineer | Data Center Infrastructure
Services
Mayo Clinic | 200 First Street SW | Rochest
Here¹s a quick example of how to begin to implement my suggestion
previously sent:
#! /usr/bin/perl
use strict;
use warnings;
use Archive::Zip;
# List the members of
../Downloads/apache-drill-1.4.0/jars/3rdparty/avro-ipc-1.7.7-tests.jar
my $zip = Archive::Zip->new(
'../Downloads/apache-drill-1
Along the same lines, but without having to use perl, you can just use the
“jar” command, which has the same general syntax as “tar”.
e.g.
tar -tf classes.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/mailcap.default
META-INF/mimetypes.default
META-INF/services/com.sun.jdi.connect.Connector
META-I