*
The moose likes Applets and the fly likes Can applet use the jar file in the WEB-INF/lib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Can applet use the jar file in the WEB-INF/lib" Watch "Can applet use the jar file in the WEB-INF/lib" New topic
Author

Can applet use the jar file in the WEB-INF/lib

Kidd He
Ranch Hand

Joined: Sep 17, 2006
Posts: 65
My applet is in the root of my application-----myapp/
But it will call a class in another package which will also be imported by the classes in the WEB-INF/classes.So I make that package into a jar file and put tha jar in the WEB-INF/lib.
When I run myapp, the applet can't work correctly,but the class in the WEB-INF/classes work well.Why?
If the applet can't call the classes in the WEB-INF/lib or WEB-INF/classes, how can I achieve the following function: the applet and the class in the WEB-INF/classes can call a class file together?
Thank you!!!


SCJP1.4 93%<br />SCWCD��
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
You can't. See my post in this similar thread.


Ping & DNS - my free Android networking tools app
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Are you asking why a file running on a client machine can't access a file running on the server?

An applet runs on the client JVM. Servlets and related code run on the Server. Those are two totally different JVMs. That's a big problem.

-Cameron McKenzie
Kidd He
Ranch Hand

Joined: Sep 17, 2006
Posts: 65
Thanks you all!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can applet use the jar file in the WEB-INF/lib