Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionEst-ce que ton applet est signée ?
Cela pose des problèmes de sécurité d'accéder à une dll, et le jar de l'applet doit être signée pour pouvoir y accéder
static CInterface demo; String idf; public int initdll() { // Library is c for unix and msvcrt for windows String libName = "C:/WINDOWS/system32/msvcrt"; // Loading dynamically the library try{ demo = (CInterface) Native.loadLibrary(libName, CInterface.class); }catch(Exception e) { e.printStackTrace(); } if(demo!=null) { return 1; }else { return 0; } }
LoadLibrary()
bouton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { // TODO Auto-generated method stub //tf.setText("dll"); hello hl=new hello(); tf.setText(hl.toString()); int rs=hl.initdll(); if(rs==0) { tf.setText("erreur"); }else { tf.setText("charger"); } } });
tf.setText(hl.toString());
tf.setText("erreur");
tf.setText("charger");marche ç.a.d que l'execution s'arrete a l'appel de méthode
int rs=hl.initdll();