Thursday 1 September 2022

Check if a Class exists in Java Jar file

Often we need to find the class or classpath exists in a java jar file or due to some Error like "could not load X class from Y module" at that time we need to check the available classes in  jar file. For that one of the common method is 


java -cp path_to.jar <Tab>  


For example, I have a jar file(hive-beeline-3.1.3.jar) at path hive/lib/. Using the command, when I press Tab, it is showing all the classes which it have.

class in jar file


Thanks

No comments:

Post a Comment