Necessary and sufficient conditions to run Java applets and JWS applications in browser?
Asked Answered
O

1

6

I have already asked this and was heavily downvoted. Unfortunately, I still can't solve it. I don't know what I do, but sooner or later I loose an ability to run java applets and java web start applications in all browsers.

Here is an example what is happening.

I am opening page with applets http://csis.pace.edu/~bergin/Java/applets.htm and getting the following picture:

enter image description here

with signs plugins were blocked. I am trying to unblock

enter image description here

which causes another dialog

enter image description here

after OK I have another

enter image description here

next

enter image description here

if clicked

enter image description here

And so on.

Applet doesn't run.

After dancing with PATHes, Java updates and so one, once I can have applet run. But sooner or later I will stuck in this position again.

I would like to know, is it possible to exclude this situation in principle?

I mean I don't want to disable security at all, but I mean that in case my explicit permission everything should run. Is it possible to do that?

UPDATE

First of all, I don't understand, why can't I run applet on outdated java if I want?

I am a human and robots should obey me! :)

Suppose I wish to debug my applet on old version of java, why not?

Second, there is no information about what version it thinks I have and what version it wants?

Without this information it is possible that there is just a bug in version detection mechanism.

I have multiple versions of Java in Program Files since I am a Java developer. Then how can I know which one it uses?

UPDATE 2

I have updated my Java from 1.8.0_20 to 1.8.0_25 and now situation have changed, but applets are sill impossible to run.

The proof I have "latest" java:

enter image description here

The proof I have added the site above to exclusions list:

enter image description here

The effect of applet run:

enter image description here

(applet not runs)

Clicking details result:

enter image description here

(no any details in fact)

So, what to do?

UPDATE 3

This site is not working: http://ssd.jpl.nasa.gov/sbdb.cgi?sstr=2012VP113;orb=1;cov=0;log=0;cad=0#orb

(show orbit diagram)

Reloading/restarting browser does not help.

Oxonian answered 20/11, 2014 at 20:41 Comment(12)
what do you see when you click on "Details" in that last dialog box? copy and paste the full exception for us. Note that Java applets expect that the latest version of java be installed. Make sure Java auto-update is enabled so that as soon as a new Java version is available it prompts you to update.Illconsidered
If I press details, I go to console without any actual details. You mean that if I don't have latest java installed, I can't run applet even by my direct order?Oxonian
It is my understanding that since two years ago the java security is more tightened so it blockes applets if Java is not updated. But I'm not 100% sure of this so you may want to do some search about it or try running the program with latest jre then try again with older jre versions to see at which version it stops working.Illconsidered
First of all, I don't understand, why can't I run applet on outdated java if I want? Suppose I wish to debug my applet on old version of java? Second, there is no information about what version it thinks I have and what version it wants? Without this information it is possible that there is just a bug in version detection mechanismOxonian
You do understand that the version of Java you use to compile and run programs is not the same (location) used by the OS, right? why don't you post the platform you're running this on?Malachite
See my update. I say, that even if I have Java 1.5, I would like to be able to run applets. I see no reason I can't. Security should not be concrete, I should be able to add exclusions. And I have an exclusion list, but it has no effect.Oxonian
My understanding is that whenever an applet is about to run, Java contacts Oracle server to see if there is a new version of Java is available. If so then it prevents running the applet unless the user upgrades to the latest available Java. Again I'm not 100% that this is true, you need to test it to be sure but I remember reading somewhere about this behvaior. To answer your first question for why it does this, it's because in 2013 it became evident that Java has lots of security holes so Oracle decided to force users to use latest Java version to ensure hackers don't take advtge of old bugs.Illconsidered
@SaeidNourian thanks, but see my last update; Java is latest there and applet is still not workignOxonian
In that case lets see if you can run a working applet. Please try this applet and let me know if you can run it in your browser: energy.concord.org/energy2d/solar-updraft-tower.htmlIllconsidered
This applet runs after few (and different) prompts. Do you have applets running from my URL?Oxonian
I cannot run your applet. I get this: "Your security settings have blocked an untrusted application from running". Looks like your applet is not signed! Are you sure you signed it? Oracle has a nice webpage that details various security warnings: java.com/en/download/help/appsecuritydialogs.xmlIllconsidered
I added your site to exception list and it still doesn't work. So then I looked at your html source and realized you're using the class file directly instead of wrapping it in a jar file. This is what you have: <applet code="GSort.class" width=700 height=400>. I think applets no longer work when using .class files directly. They have to be wrapped in jar files because you need to add some security settings to the meta-inf folder of the jar file. Here is how oracle recommends deploying an applet: docs.oracle.com/javase/tutorial/deployment/applet/…Illconsidered
I
1

I looked at your html source and realized you're using the .class file directly instead of wrapping it in a jar file. This is what you have:

<applet code="GSort.class" width=700 height=400>

I think applets no longer work when using .class files directly due to new security requirements. They have to be wrapped in jar files because you need to add some security settings to the meta-inf folder of the jar file. Here is how oracle recommends deploying an applet:

https://docs.oracle.com/javase/tutorial/deployment/applet/deployingApplet.html

Edit: I tried again with adding the site url to the Java security exception list and this time I got it to work! It looks like chrome stays in memory after exiting so changing Java security doesn't affect it unless you shut down chrome completely and restart it. Easiest way is to use Internet Explorer. Try it with Internet Explorer and it should work (assuming that you still have the site added under java security exception list).

Illconsidered answered 28/11, 2014 at 6:5 Comment(5)
Are you sure this is it? It is not my site, it is just first googled page for "java applet sample". If the reason is that file is not in JAR format, then why runtime doesn't say this? Why do error messages say something completely irrelevant?Oxonian
I tried again with adding the site url to the Java security exception list and this time I got it to work! It looks like chrome stays in memory so changing Java security doesn't affect it unless you shut down chrome completely and restart it. Easiest way is to use Internet Explorer. Try it with Internet Explorer and it should work (assuming that you still have the site added under java security exception list). If it didn't work please post the screenshot.Illconsidered
Hm, it started to work for me too! So, the current hypothesis is some caching after adding site to the exclusion list....Oxonian
Looks like only chrome has that problem because even when you close all chrome instances it still stays as a small icon on the system tray (the small icons on the lower right corner of screen next to current time). You have to right-click on that system tray icon of chrome and click exit for it to work.Illconsidered
After adding the site in the exception list its working fine for me. Make sure you restart the browser completely after modifying exception list.Chaiken

© 2022 - 2024 — McMap. All rights reserved.