Thanks for reply.
I appologize for late reply on this one.
After posting this question, I have gone further in finding the solution to my problem.
To answer your question, I want to load a class from a jar file. However, as my application requires securing Jar file, I am encrypting the whole jar file and whenever my application needs any class from this encrypted jar, I decrypt the jar file and then extract the class.
I am doing this by creating my own application class loader. I was able to get the jar decrypted and load in JarInputStream. But I am again stuck in another problem. When I take out a JarEntry from the JarInputStream (I have used a code from net from (@author
Simon Mieth)), i get the size of this JarEntry as -1. I checked other variables like CRC and compressedSize, both of them are -1.
I thought it must be problem of encryption. But when I tried with plane jar file, it again gave me the same problem, that the size of JarEntry is -1.
What do you think is the problem?