my dog learned polymorphism*
The moose likes Applets and the fly likes My applet is not being seen in its jar anymore. Please help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "My applet is not being seen in its jar anymore. Please help!" Watch "My applet is not being seen in its jar anymore. Please help!" New topic
Author

My applet is not being seen in its jar anymore. Please help!

Alexandra Niculai
Greenhorn

Joined: Nov 05, 2008
Posts: 10
Hello!

I have been trying to make this example work (example link). And I had succeded at a moment. This is an applet, SWTInBrowser, that should show three buttons: one awt, one Swing and one SWT.
If I just run it with the Applet Viewer, I get all the three buttons, because the program knows where to find the external library. Then I put the applet in a jar, created an HTML file and ran it in FireFox and IE and I only got the AWT button and Swing button, because the swt.jar is external and I received the access denied error.
Then I followed step by step what the author of the article in the link sugested, but it didn't work. I tried to come back to what I had before, but now it doesn't wprk anymore, I keep getting the fileNotFound error, he can't see the applet in the jar.
Here is the HTML file, which is in the same folder with the applet's jar.



I have no idea what to do next. Can you please help me?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18715
    
    8

In your browser, make sure that both the following links return a file:

http://yourhost/MyApplet.jar


http://yourhost/org.eclipse.swt.win32.win32.x86_3.4.1.v3452b.jar


If you get a "404 Not Found" error for the second one, then you didn't put it in the right place for your web server to respond to requests for it.
Alexandra Niculai
Greenhorn

Joined: Nov 05, 2008
Posts: 10
When I put in the browser the jars' addresses, I get the option of downloading the file or opening the file. Is that OK?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42373
    
  64
Are there any error messages in the Java Console?


Ping & DNS - my free Android networking tools app
Alexandra Niculai
Greenhorn

Joined: Nov 05, 2008
Posts: 10
Yes, but I don't get the same error all the time, even if the application stays the same(I don't understand that either).



Or, this error:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My applet is not being seen in its jar anymore. Please help!