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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -