java - I am getting the error when I run applet in HTML page even after I have signed all the jar files -


both videoplayer , html contains external jar files in library jna-3.5.2.jar,platform-3.5.2.jar , vlcj-2.4.1.jar. both videoplayer , html page in different projects in netbeans , have included external jar files mentioned above in both projects.

this code of videoplayer class.

package player;  import com.sun.jna.nativelibrary; import java.awt.borderlayout; import java.awt.color; import uk.co.caprica.vlcj.component.embeddedmediaplayercomponent; import uk.co.caprica.vlcj.runtime.runtimeutil;  public class videoplayer extends javax.swing.japplet{   public  embeddedmediaplayercomponent mediaplayercomponent;                @override      public void init() {        try{          nativelibrary.addsearchpath(runtimeutil.getlibvlclibraryname(),"./src");        nativelibrary.addsearchpath(runtimeutil.getpluginsdirectoryname(),"./src");          setbackground(color.red);         setsize(500,500);           mediaplayercomponent = new embeddedmediaplayercomponent();         }        catch(exception e){            system.out.println(e);        }          /* set nimbus , feel */         //<editor-fold defaultstate="collapsed" desc=" , feel setting code (optional) ">         /* if nimbus (introduced in java se 6) not available, stay default , feel.          * details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html           */         try {             (javax.swing.uimanager.lookandfeelinfo info : javax.swing.uimanager.getinstalledlookandfeels()) {                 if ("nimbus".equals(info.getname())) {                     javax.swing.uimanager.setlookandfeel(info.getclassname());                     break;                 }             }         } catch (classnotfoundexception ex) {             java.util.logging.logger.getlogger(videoplayer.class.getname()).log(java.util.logging.level.severe, null, ex);         } catch (instantiationexception ex) {             java.util.logging.logger.getlogger(videoplayer.class.getname()).log(java.util.logging.level.severe, null, ex);         } catch (illegalaccessexception ex) {             java.util.logging.logger.getlogger(videoplayer.class.getname()).log(java.util.logging.level.severe, null, ex);         } catch (javax.swing.unsupportedlookandfeelexception ex) {             java.util.logging.logger.getlogger(videoplayer.class.getname()).log(java.util.logging.level.severe, null, ex);         }         //</editor-fold>          /* create , display applet */         try {             java.awt.eventqueue.invokeandwait(new runnable() {                 public void run() {                     initcomponents();                     // japplet jp=new japplet();                     //jp.setlocation(100,100);                     //jp.setsize(500,500);                 }             });         } catch (exception ex) {             ex.printstacktrace();         }     }      /**      * method called within init() method initialize      * form. warning: not modify code. content of method      * regenerated form editor.      */     @suppresswarnings("unchecked")     // <editor-fold defaultstate="collapsed" desc="generated code">                               private void initcomponents() {          jframe1 = new javax.swing.jframe();         jframe2 = new javax.swing.jframe();         jtoolbar1 = new javax.swing.jtoolbar();         videopanel = new javax.swing.jpanel();         lowerpanel = new javax.swing.jpanel();         play = new javax.swing.jbutton();         pause = new javax.swing.jbutton();         forward = new javax.swing.jbutton();         backward = new javax.swing.jbutton();         snapshot = new javax.swing.jbutton();         volume = new javax.swing.jslider();         upperpanel = new javax.swing.jpanel();         exitfullscreen = new javax.swing.jbutton();         open = new javax.swing.jbutton();         stop = new javax.swing.jbutton();         fullscreen = new javax.swing.jbutton();          javax.swing.grouplayout jframe1layout = new javax.swing.grouplayout(jframe1.getcontentpane());         jframe1.getcontentpane().setlayout(jframe1layout);         jframe1layout.sethorizontalgroup(             jframe1layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgap(0, 400, short.max_value)         );         jframe1layout.setverticalgroup(             jframe1layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgap(0, 300, short.max_value)         );          javax.swing.grouplayout jframe2layout = new javax.swing.grouplayout(jframe2.getcontentpane());         jframe2.getcontentpane().setlayout(jframe2layout);         jframe2layout.sethorizontalgroup(             jframe2layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgap(0, 400, short.max_value)         );         jframe2layout.setverticalgroup(             jframe2layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgap(0, 300, short.max_value)         );          jtoolbar1.setrollover(true);          setbackground(new java.awt.color(51, 51, 51));         addpropertychangelistener(new java.beans.propertychangelistener() {             public void propertychange(java.beans.propertychangeevent evt) {                 formpropertychange(evt);             }         });          videopanel.setbackground(new java.awt.color(51, 51, 51));          lowerpanel.setbackground(new java.awt.color(0, 0, 0));          play.setbackground(new java.awt.color(0, 0, 0));         play.setforeground(new java.awt.color(255, 0, 0));         play.settext("play");         play.settooltiptext("");         play.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 playactionperformed(evt);             }         });          pause.setbackground(new java.awt.color(0, 0, 0));         pause.setforeground(new java.awt.color(255, 0, 0));         pause.settext("pause");         pause.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 pauseactionperformed(evt);             }         });          forward.setbackground(new java.awt.color(0, 0, 0));         forward.setforeground(new java.awt.color(255, 0, 0));         forward.settext("fwd");         forward.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 forwardactionperformed(evt);             }         });          backward.setbackground(new java.awt.color(0, 0, 0));         backward.setforeground(new java.awt.color(255, 0, 0));         backward.settext("bwd");         backward.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 backwardactionperformed(evt);             }         });          snapshot.setbackground(new java.awt.color(0, 0, 0));         snapshot.setforeground(new java.awt.color(255, 0, 0));         snapshot.settext("snapshot");         snapshot.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 snapshotactionperformed(evt);             }         });          volume.setbackground(new java.awt.color(0, 0, 0));         volume.setforeground(new java.awt.color(255, 51, 0));         volume.setmajortickspacing(2);         volume.setmaximum(200);         volume.setminortickspacing(1);         volume.addchangelistener(new javax.swing.event.changelistener() {             public void statechanged(javax.swing.event.changeevent evt) {                 volumestatechanged(evt);             }         });          javax.swing.grouplayout lowerpanellayout = new javax.swing.grouplayout(lowerpanel);         lowerpanel.setlayout(lowerpanellayout);         lowerpanellayout.sethorizontalgroup(             lowerpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(lowerpanellayout.createsequentialgroup()                 .addcomponent(play, javax.swing.grouplayout.preferred_size, 53, javax.swing.grouplayout.preferred_size)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(pause)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(forward)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(backward)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(snapshot)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(volume, javax.swing.grouplayout.preferred_size, 96, javax.swing.grouplayout.preferred_size)                 .addcontainergap(308, short.max_value))         );         lowerpanellayout.setverticalgroup(             lowerpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(lowerpanellayout.createsequentialgroup()                 .addcontainergap()                 .addgroup(lowerpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.trailing)                     .addcomponent(volume, javax.swing.grouplayout.preferred_size, 23, javax.swing.grouplayout.preferred_size)                     .addgroup(lowerpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.baseline)                         .addcomponent(play)                         .addcomponent(pause)                         .addcomponent(forward)                         .addcomponent(backward)                         .addcomponent(snapshot)))                 .addcontainergap(14, short.max_value))         );          upperpanel.setbackground(new java.awt.color(0, 0, 0));         upperpanel.setforeground(new java.awt.color(255, 255, 255));          exitfullscreen.setbackground(new java.awt.color(0, 0, 0));         exitfullscreen.setforeground(new java.awt.color(255, 0, 0));         exitfullscreen.settext("exit full screen");         exitfullscreen.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 exitfullscreenactionperformed(evt);             }         });          javax.swing.grouplayout upperpanellayout = new javax.swing.grouplayout(upperpanel);         upperpanel.setlayout(upperpanellayout);         upperpanellayout.sethorizontalgroup(             upperpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(javax.swing.grouplayout.alignment.trailing, upperpanellayout.createsequentialgroup()                 .addcontainergap(javax.swing.grouplayout.default_size, short.max_value)                 .addcomponent(exitfullscreen)                 .addcontainergap())         );         upperpanellayout.setverticalgroup(             upperpanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(javax.swing.grouplayout.alignment.trailing, upperpanellayout.createsequentialgroup()                 .addgap(0, 0, short.max_value)                 .addcomponent(exitfullscreen))         );          open.setbackground(new java.awt.color(0, 0, 0));         open.setforeground(new java.awt.color(255, 0, 0));         open.settext("open");         open.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 openactionperformed(evt);             }         });          stop.setbackground(new java.awt.color(0, 0, 0));         stop.setforeground(new java.awt.color(255, 0, 0));         stop.settext("stop");         stop.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 stopactionperformed(evt);             }         });          fullscreen.setbackground(new java.awt.color(0, 0, 0));         fullscreen.setforeground(new java.awt.color(255, 0, 0));         fullscreen.settext("full screen");         fullscreen.addactionlistener(new java.awt.event.actionlistener() {             public void actionperformed(java.awt.event.actionevent evt) {                 fullscreenactionperformed(evt);             }         });          javax.swing.grouplayout videopanellayout = new javax.swing.grouplayout(videopanel);         videopanel.setlayout(videopanellayout);         videopanellayout.sethorizontalgroup(             videopanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addcomponent(lowerpanel, javax.swing.grouplayout.default_size, javax.swing.grouplayout.default_size, short.max_value)             .addgroup(videopanellayout.createsequentialgroup()                 .addgap(2, 2, 2)                 .addcomponent(open)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related)                 .addcomponent(stop, javax.swing.grouplayout.preferred_size, 63, javax.swing.grouplayout.preferred_size)                 .addgap(14, 14, 14)                 .addcomponent(fullscreen)                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.unrelated)                 .addcomponent(upperpanel, javax.swing.grouplayout.default_size, javax.swing.grouplayout.default_size, short.max_value))         );         videopanellayout.setverticalgroup(             videopanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(javax.swing.grouplayout.alignment.trailing, videopanellayout.createsequentialgroup()                 .addgroup(videopanellayout.createparallelgroup(javax.swing.grouplayout.alignment.leading)                     .addcomponent(upperpanel, javax.swing.grouplayout.preferred_size, javax.swing.grouplayout.default_size, javax.swing.grouplayout.preferred_size)                     .addgroup(videopanellayout.createparallelgroup(javax.swing.grouplayout.alignment.baseline)                         .addcomponent(open)                         .addcomponent(stop)                         .addcomponent(fullscreen)))                 .addpreferredgap(javax.swing.layoutstyle.componentplacement.related, 439, short.max_value)                 .addcomponent(lowerpanel, javax.swing.grouplayout.preferred_size, javax.swing.grouplayout.default_size, javax.swing.grouplayout.preferred_size))         );          javax.swing.grouplayout layout = new javax.swing.grouplayout(getcontentpane());         getcontentpane().setlayout(layout);         layout.sethorizontalgroup(             layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addgroup(layout.createsequentialgroup()                 .addcontainergap(javax.swing.grouplayout.default_size, short.max_value)                 .addcomponent(videopanel, javax.swing.grouplayout.preferred_size, javax.swing.grouplayout.default_size, javax.swing.grouplayout.preferred_size))         );         layout.setverticalgroup(             layout.createparallelgroup(javax.swing.grouplayout.alignment.leading)             .addcomponent(videopanel, javax.swing.grouplayout.alignment.trailing, javax.swing.grouplayout.preferred_size, javax.swing.grouplayout.default_size, javax.swing.grouplayout.preferred_size)         );     }// </editor-fold>                               private void openactionperformed(java.awt.event.actionevent evt) {                                              // todo add handling code here:       try{         borderlayout blmain=new borderlayout();         borderlayout blvideo=new borderlayout();          setlayout(blmain);         videopanel.setlayout(blvideo);          videopanel.add(mediaplayercomponent,blmain.center);         videopanel.add(upperpanel,blmain.north);         videopanel.add(lowerpanel,blmain.south);         videopanel.validate();              mediaplayercomponent.getmediaplayer().preparemedia(".\\src\\abc.mp4");         mediaplayercomponent.getmediaplayer().setvolume(50);       }      catch(exception e){          system.out.println(e);      }     }                                            private void playactionperformed(java.awt.event.actionevent evt) {                                              // todo add handling code here:         mediaplayercomponent.getmediaplayer().play();      }                                          private void pauseactionperformed(java.awt.event.actionevent evt) {                                               // todo add handling code here:         mediaplayercomponent.getmediaplayer().pause();      }                                           private void forwardactionperformed(java.awt.event.actionevent evt) {                                                 // todo add handling code here:  mediaplayercomponent.getmediaplayer().skip(10000);      }                                             private void backwardactionperformed(java.awt.event.actionevent evt) {                                                  // todo add handling code here:         mediaplayercomponent.getmediaplayer().skip(-10000);      }                                              private void snapshotactionperformed(java.awt.event.actionevent evt) {                                                  // todo add handling code here:         mediaplayercomponent.getmediaplayer().setsnapshotdirectory("d:\\");         mediaplayercomponent.getmediaplayer().savesnapshot();      }                                              private void volumestatechanged(javax.swing.event.changeevent evt) {                                             // todo add handling code here:         mediaplayercomponent.getmediaplayer().setvolume(volume.getvalue());     }                                         private void fullscreenactionperformed(java.awt.event.actionevent evt) {                                                    // todo add handling code here:         videopanel.setsize(1366,650);         setsize(videopanel.getsize());         videopanel.revalidate();         upperpanel.revalidate();         lowerpanel.revalidate();      }                                                private void stopactionperformed(java.awt.event.actionevent evt) {                                              // todo add handling code here:        mediaplayercomponent.getmediaplayer().stop();        videopanel.remove(mediaplayercomponent);     }                                          private void formpropertychange(java.beans.propertychangeevent evt) {                                             // todo add handling code here:      }                                         private void exitfullscreenactionperformed(java.awt.event.actionevent evt) {                                                        // todo add handling code here:         setsize(500,500);         videopanel.setsize(500,500);     }                                                /*  */        // variables declaration - not modify                          private javax.swing.jbutton backward;     private javax.swing.jbutton forward;     private javax.swing.jbutton open;     private javax.swing.jbutton pause;     private javax.swing.jbutton play;     private javax.swing.jbutton snapshot;     private javax.swing.jbutton stop;     private javax.swing.jslider volume;     private javax.swing.jbutton exitfullscreen;     private javax.swing.jbutton fullscreen;     private javax.swing.jframe jframe1;     private javax.swing.jframe jframe2;     private javax.swing.jtoolbar jtoolbar1;     private javax.swing.jpanel lowerpanel;     private javax.swing.jpanel upperpanel;     private javax.swing.jpanel videopanel;     // end of variables declaration                      } 

the code of html page

    <html>     <head>         <title>todo supply title</title>         <meta charset="utf-8">         <meta name="viewport" content="width=device-width, initial-scale=1.0">     </head>     <body>        <applet code ="player.videoplayer" archive="vlcmediaplayer.jar" height="500" width ="500"></applet>     </body> </html> 

when run applet separately works fine when run on html page , click on of button following error :

exception in thread "awt-eventqueue-2" java.lang.exceptionininitializererror

caused by: java.security.accesscontrolexception: access denied ("java.util.propertypermission" "jna.tmpdir" "read")


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -