how to determine package name of a class in a jar file -


for example, in following example of log4j.jar: log4j jar folder path class file logger.class

to import:

import org.apache.log4j.logger; 

is package name "org.apache.log4j" determined path \org\apache\log4j\logger.class?

yes, package name needs match path in jar file (or directory). otherwise class cannot found.

however, cannot move class file around change package. encoded class bytecode itself. if want change it, need recompile class.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -