File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Applet not inited - http 401 on .jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not inited - http 401 on .jar files" Watch "Applet not inited - http 401 on .jar files" New topic
Author

Applet not inited - http 401 on .jar files

Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Hi guys,
I have a complex applet which is contained in a jar file, and also relies on a few other jar files as libraries (for 3D stuff). All these are in the same directory as the HTML file, and up until a few days ago the applet was working great.
Now when I try and load it in the browser I get Applet nto inited and the following sort of message in the console for each jar file, starting with the main one that contains the applet itself...

The weird thing is the applet still works on some PC's, but not on mine and also doesn't work for some other people. I'm guessing this is some kind of security problem, but I don't really know where to start looking! Any pointers greatly appreciated, has anyone had this problem before?

cheers
[ February 11, 2004: Message edited by: Ben Wood ]

SCJP 1.4, www.gsi3d.org.uk
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Ben
From the exception it seems from some PCs it doesn't find the jar file...
try to make sure that on the PC where the applet doesn't work, the url-
http(myserver)/etc/myapplet.jar is reachable. if that url is reachable directly via the browser the JVM in the browser should find it...because it doesn't make much sense that on some PCs it finds the jar and on some it doesn't as it is hosted on the server side.
Also, make sure that your proxy configuration on the browsers that you are using is not causing this issue..
Regards
Maulin
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
any updates Ben?
We would like to keep learning from people's experiences so please post your resolution about the problem you had..
Regards
Maulin
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Hi Maulin,
We eventually tracked this down to using certain types of paths in our applet code. The applet itself is a 3D viewer for data, and we were loading files that had been generated on the server immediately before the applet was initialised. Our mistake was to use a drive-mapping like...
R:\\datafiles\data.dat
I'm not sure why we even did this in certain places in the code. It was fixed by altering the path to point at the server like this...
\\\\myserver\\datafiles\\data.dat
...presumably the reason it worked for some PC's but not others was that over time, drive mappings had changed on people's PC's. A foolish piece of bad practice really
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi Ben
Yes, those drive mappings kills sometimes. I faced similar issue recently.
Thanks for letting us know.
Regards
Maulin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet not inited - http 401 on .jar files
 
Similar Threads
My applet is not being seen in its jar anymore. Please help!
Applet only works with one Java version
executable jar build by JBuilderX, NoClassDefFoundError!!
Applet not loading due to IOException
Problem loading applet from servlet - load: xxx.class not found