Classpath problem: javap is able to locate one class in a jar but not the other.

  • Thread starter Chandresh Prakash
  • Start date
C

Chandresh Prakash

Hi,
I have a jar file in my classpath that has several classes. When I do
javap
for a particular class in the jar, it declares:
Class 'net.sourceforge.groboutils.testing.codecoverage.v2.ant.CoveragePostCompilerTask'
not found

But when I do javap for a different class in the jar, it finds it
out:

javap.exe net.sourceforge.groboutils.util.io.v1.FileUtils

Compiled from FileUtils.java
public class net.sourceforge.groboutils.util.io.v1.FileUtils extends
java.lang.Object {
protected static net.sourceforge.groboutils.util.io.v1.FileUtils
s_instance;
protected net.sourceforge.groboutils.util.io.v1.FileUtils();
public static net.sourceforge.groboutils.util.io.v1.FileUtils
getInstance();
public void copyFileToDirectory(java.io.File, java.io.File) throws
java.io.IOException;
public void copyFileToFile(java.io.File, java.io.File) throws
java.io.IOException;
public java.io.File findFileRecurse(java.io.File,
java.io.FilenameFilter)[];
static {};
}

Thanks,
Chandresh
 
J

Jeffrey Palm

Chandresh said:
Hi,
I have a jar file in my classpath that has several classes. When I do
javap
for a particular class in the jar, it declares:
Class 'net.sourceforge.groboutils.testing.codecoverage.v2.ant.CoveragePostCompilerTask'
not found

But when I do javap for a different class in the jar, it finds it
out:

javap.exe net.sourceforge.groboutils.util.io.v1.FileUtils

Compiled from FileUtils.java
public class net.sourceforge.groboutils.util.io.v1.FileUtils extends
java.lang.Object {
protected static net.sourceforge.groboutils.util.io.v1.FileUtils
s_instance;
protected net.sourceforge.groboutils.util.io.v1.FileUtils();
public static net.sourceforge.groboutils.util.io.v1.FileUtils
getInstance();
public void copyFileToDirectory(java.io.File, java.io.File) throws
java.io.IOException;
public void copyFileToFile(java.io.File, java.io.File) throws
java.io.IOException;
public java.io.File findFileRecurse(java.io.File,
java.io.FilenameFilter)[];
static {};
}

Thanks,
Chandresh

Well, does
net.sourceforge.groboutils.testing.codecoverage.v2.ant.CoveragePostCompilerTask
actually exist in the file? Just do:

% jar <jarfile> | grep CoveragePostCompilerTask

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top