Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Alexandra Niculai
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any error messages in the Java Console?
 
Alexandra Niculai
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic