我需要一些幫助,在我的jnlp應用程序showDocument。 我試圖在瀏覽器的另一個選項卡中顯示一個pdf文件,但是java插件被拒絕。權限在jnlp中被拒絕嘗試調用showDocument與pdf文件
我的JNLP文件具有
<security>
<all-permissions/>
</security>
,我的代碼是:
AccessController.doPrivileged(new PrivilegedAction()
{
@Override
public Object run()
{
try
{
applet.getAppletContext().showDocument(new URL("file:///C:/Contrato.PDF"), "_blank");
}
catch(Exception e)
{
e.printStackTrace();
showException("Erro ao exibir arquivo:" + e.getMessage());
}
return null;
}
});
,但我收到異常
java.lang.SecurityException: showDocument url permission denied
如果我嘗試做showDocument(google.com ,_blank)...,但當我嘗試顯示任何文件時,它不起作用。
'showDocument(new URL(「file:/// C:/Contrato.PDF」),「_blank」);' - 'showDocument' was * not * designed for shown off off off off the computer of end用戶!該PDF是在客戶端還是服務器上? – 2011-12-24 20:09:57
在客戶端 – 2012-01-04 22:09:55