Load applet through javascript

Asked

Viewed 206 times

0

I have a java web start project (a applet more precisely) and I want to rotate (display the applet) with javascript.

Chrome has a way to run the applet, but you need to click on the link. I want a function (it can be jquery or other technology) that automatically initializes the applet in the browser.

Someone can inform me?

  • Chrome didn’t block this? How are you running it? Mine here doesn’t even recognize the version on the oracle website anymore.

  • Yeah, but I want it to work somehow.

1 answer

2


Unable to force startup, please pay attention to what I will say, the browser is divided and layers, basically it has the following structures:

  • Rendering engine (DOM and CSS)
  • Javascript engine
  • Abstract interfaces of elements and functionalities

When an Applet is injected into the DOM this is passed to the layer responsible for interpreting and locating a plugin to run it, but who decides this is the browser, when it arrives in this layer the browser can pass the option to the user (in case the click)if the user wishes to run the applet he will have to click or confirm (varying according to the browser).

Understand something, plugins can always open loopholes that can compromise security, so the reason this is blocked is something important, user safety, if you could force the unlock would be the same as putting the user at risk, put yourself in his place, imagine browsing and any infected site manage to run a plugin on your machine that can compromise your data, privacy (theft of information) and security, would really like this to be possible?

Ok? So how to solve? Simply let the user decide whether or not he wants to run, if he wishes he can release the applets definitely for your site, another thing assuming it is an intranet, or a Dashboard from a website, you can request that your users (assuming they work in the same company as you or are your customers) manually unlock the applets to their browsers.

It is very important to note (as told by @diegofm) what plugin running on the NPAPI will soon be disabled by browsers (Chrome and Chromium-based browsers like Opera no longer support NPAPI), even the Flash that runs on the PPAPI (Pepper API) will be blocked by Chrome by default (http://www.pcmag.com/news/344483/google-chrome-to-block-flash-by-default).

I even block the Flash in my browser and any other plugin, until those of players like the Windows Media Player.

If it is a public site and cares about the future of its users is really recommend that you change technology, we have Canvas (Html5) combined with Javascript API and various html+css frameworks to build forms and whole pages, for example Bootstrap and the Material Design

  • 1

    Great explanation! Not to mention that the NPAPI plugins (like the one in java) are being depreciated "the force" by the browsers. It is very likely that as of 2017 none of the most popular browsers run these plugins more.

  • 1

    @diegofm well remembered, added with a note to you :D Thank you

  • :( But this news is bad for me.

  • 1

    @gonz yes, the future is no longer dependent on applets, flash or anything that can open security loopholes or make the machine dependent on something (which is often bad for the user). For some years now, browser developers have been planning to get rid of them and use only the browser, thus facilitating the user’s life. Any technique they invent to unlock (which is impossible because it is on a different layer) would probably be blocked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.