Upload applet via javascript

0

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

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

Can anyone tell me?

    
asked by anonymous 30.05.2016 / 21:33

1 answer

3

Can not force startup, Please pay attention to what I say, the browser is divided and layers, basically it has the following structures:

  • Motor rendering (DOM and CSS)
  • Javascript Engine
  • Abstracted elements and functionalities interfaces
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 at this layer the browser can pass the option to the user ( in case the click), if the user wants to run the applet will have to click or confirm (varying according to the browser).

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

Okay? So how to solve? Simple let the user decide whether or not he wants to run, if he wishes he can release the applets definitely for your site, otherwise assuming it is an intranet, or a dashboard in a> site, you can request that your users (assuming they work in the same company as you or your clients) manually unlock the applets for their browsers.

It's very important to note ( as told by @diegofm ) that plugins that run on NPAPI will soon be disabled by browsers (Chrome and Chromium-based ones like Opera will no longer support NPAPI ), even the Flash that runs on the PPAPI (Pepper API) will be blocked by Chrome by default ( link ).

I even blocked Flash in my browser and any other plugin, even from players like Windows Media Player .

If it's a public site and it worries about the future of its users, I really recommend switching technology, we have Canvas (html5) combined with Javascript API and several html + css frameworks to build forms and whole pages, such as Bootstrap and Material Design

    
31.05.2016 / 02:54