aspose file tools*
The moose likes Applets and the fly likes browsers won't let applets run 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 "browsers won Watch "browsers won New topic
Author

browsers won't let applets run

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i have a couple applets in a web page on my computer. i tried to run the page but got a message that i didnt have java(i do but the browsers couldn't find it). i went ahead and got it. now the browsers all block the applets. in Chrome for example i get a message telling me java is blocked. it asks me if i want to run it this time or everytime from this site. i have tried choosing both, but it still blocks them

i don't get it. i read a little more and then went to chrome://plugins
i checked the box saying always allow java.
it still blocks them

i have IE, Firefox, and Chrome. i need at least one of them to run applets
they are very old applets(jarred) written in java1 and compiled in java2, but i don't see why that would matter.
i will try making a page using a new applet written in java1 and compiled in java7(a refactored version of one of the others) and see if that works.

that didn't work either

i folllowed the instructions for allowing java in IE and it was already enabled.
i tried restarting. that didn't help either.
i wish i knew what was going on


SCJP
Visit my download page
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 468
    
    1

You may need to sign your applet with a digital certificate.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i hope not. i have never had to do that before( these applets always used to work). thanks for the suggestion. i am going to first see if maybe it is windows 8 that is doing the blocking.

all i have found out so far is that i am not alone. this is a known(windows 8, and perhaps earlier) issue but so far i haven't seen a solution.

one more reason to despise Microsoft
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

this is soooo annoying!!!
i found that you use something called "Java Control Panel" to fix this. they say to search for it then click on it. i do the search and it finds it, but when i click it, it doesn't run. if i had an address he could send it to, i would ask my brother to send me windows 2000(he has my CD containing it)

i hate microsoft
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

It is unlikely that Windows 2000 will have the drivers for your up-to-date laptop.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
I don't mean to sound patronizing, but when you say "click", you mean "double-click", right? Because that's the way to start control panels.


Ping & DNS - my free Android networking tools app
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

Modern browsers block applets because that's where the majority of java security exploits occur.

Are these applets that you wrote, or applets that you need to use for some reason? Applets are an old and dead technology.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

applets i wrote. i can't get the error again that is displayed regarding the new applet. it said some problem with magic number

arg! i just noticed my earlier post did not get posted. i managed to find java control panel. i reduced the security setting and now the original two applets work but the new one gives me an error saying something about a magic number
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

I believe that magic number issues usually mean that the class file is corrupted.

Here's an older post on the topic.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

yeah, i was just reading what little i could find about it. it looks like if i recompile then re-jar it it might work

i still hate microsoft even though i use windows
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61414
    
  67

You are far from alone in that respect.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

ok, i am REALLY pissed now. recompiling fixed the magic number problem. the applet works now, but it can't seem to find the image and audio files. it worked fine when i first wrote it in 2000 and when i wrote the html to display it as a homework assignment in 2003, and the new version worked a month or so ago before my old computer quit working. i even tried including the image and audio files in the jar. i will post all the code hoping someone see the problem.




Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
Including the files in the jar file won't work if you're using getDocumentBase(). If the code worked before when the files were not in the jar, why would you change that now (unless you have changed the code accordingly)? What is the layout of all involved files and directories? I think the files would need to be in the same directory as the HTML file.

By the way, I understand why you might get impatient getting this to work, but do not confuse problems with the code, or the files, or Java, or the JDK, with frustration about the underlying OS. Whatever other issues the OS might have caused, just about nothing you describe in this topic sounds to me like it has its cause in the OS, but more likely in using different versions of Java, and different versions of browsers, that behave in different ways that the older versions. If you have a brand new computer, you're likely to be using different version of just about every piece of software - that those work differently has very little to do with Windows.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

you are right Ulf. i just got frustrated. i knew including them in the jar wouldn't help but i got frustrated. all the files are in one folder. i have the old version which always worked, and the refactored version(four classes) that worked in eclipse when i had that program. i finally decided to jar that up is when i noticed theses problems. right now, still, for some reason, the applets run. everything except the image and audio files are not being found(both versions in different folders). i will try the other browsers next. you are right everything i use is a new and different version now.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
both versions in different folders

That sounds suspicious. If I understand the code correctly, then both images and sound files should be in the same folder as the HTML file.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i meant each version is in it's own folder along with the image and audio files. sorry i confused you. i think i know what might be wrong. i am going to re-jar it correctly and upload it to my website. if it works from there, then it must be a windows thing.

just as i suspected! from a website it works fine. windows must be having a problem with the fact that they are local files
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: browsers won't let applets run