Java applet执行客户端脚本设置步骤
由于web 服务器迁移中,有报价系统需要通过在客户端执行vbs脚本从sap里面下载数据实现数据交换,升级后applet调用vbs脚本不成功,经过大量的阅读和测试,已经解决,在此作以记录,以备参考和查阅.
1.some.class->some.jar->some.store->some.cert->applet.policy
applet.policy:
keystore "http://[machine name].cn.[domain name].com/Applets/AutoSAP.store","JKS";grant signedBy "AutoSAP"{ permission java.io.FilePermission "<<ALL FILES>>", "read,write,excute";};
notes:jarsigner.exe需要安装JDK后才有此文件.
2.New virtual directory :Applets(D:\inetpub\*\Web\Applets),copy thest files to this folder:some.class,some.jar,some.store,some.cert,applet.policy
Clients:
1.Install JRE(Latest version)
2.JRE\lib\security\
java.security add:
policy.url.3=http://[machine name].cn.[domain name].com/Applets/applet.policy
java.policy add:
grant {
permission java.security.AllPermission;//add,maybe set fewer permission,no tested
};
References:
http://tech.163.com/05/0712/10/1OF38ICE00091589.html
http://www.cnblogs.com/diyunpeng/archive/2012/01/09/2317234.html
http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html