Hi I am facing a problem with applets, they are not running if the applet class files are not in the same dir as that of the html file. 1.Pls suggest with sample how to change the .java.policy file so that the applet /object tag can read from a jar file placed in a different folder. 2.Putting the dir entry in the system path also does not help. What are the ways to make the applet classloader look for byte code in the system path 3. Suggest any other way that will solve my problem... Your help will be appritiated. I am using IE6 with JRE 1.4.2.01 I have recently started facing this problem (after moving to 1.4 ver or JRE)
I have tried this it works only if the jar file is in the relative path w.r.t the html/jsp file. But if I put the jar myjar.jar in c:\dir1 and the html file in the c:\dir2, it doesn't work(c:\dir1\myjar.jar is in the system path and classpath). The applet only tries to find it in the relative path, I can't use codebase and give the actual physical path (it works if I do)I want my code to be independent of the location of the jar. Do you still have any more thoughts ??
Joined: Sep 29, 2003
You've confused me a bit. I still don't feel like I have all the info I need, but I'm going to make some guesses - hopefully they will be right. <BEGIN GUESSES> You have a 3rd party library in a jar. Let's call it 3rdparty.jar You wrote a class or classes that use the jar. </BEGIN GUESSES> Assuming those 2 statements above are correct..... Put your class or classes into a jar of its own. Let's call it myjar.jar. Now do something like this in the HTML:
If the HTML is in c:\html and the 3rdparty jar is in c:\3rdparty and your jar is in c:\myjars you can use this: