Hi all:
I am working on a web application that somebody else has worked on in the past. There is a need to modify a java file recompile it and replace with the one inside a signed jar file. Btw, the jar file is in one of the tomcat 5's application directory.
What I did was :
extract the jar file.
recompiled the source code (only one .java file has be recompiled, the rest of them are kept as class files).
replace the recompiled class file with the old class file.
jar'd everything together using command "jar -cMf myJar.jar folder1 folder2 folder3 file1.class file2.class"
reason why I used "M" is because I don't want to recreate a Manifest folder and I kept the old "SF" inside the META-INF folder as well.
I reloaded the application, and when I ran it, it gave me "ClassNotFound" exception, stating it couldn't find the new class file I just compiled.
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: IORLFCallApplet.class
BTW, I compiled the java file in my local machine, which does not have the same version jdk as the one in the server. My is 1.6.0_24 and the server has 1.6.0_14. So I highly doubted it is the problem. Thanks.