有没有人遇到过这个?这给我的小程序工作带来了很多麻烦。我认为它不起作用的原因是由于我的程序中的套接字与服务器通信。但是,我不知道如何阻止它,谷歌也没有帮助。我无法获得异常,因为 google chrome 的 java 控制台没有输出错误,只是在单击错误小程序说它出错后才给我一个弹出窗口。如果需要代码,我会添加。提前谢谢。
security: --- parseCommandLine converted : -Djava.net.preferIPv4Stack=true
into:
[-Djava.net.preferIPv4Stack=true]
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@acf892
basic: Plugin2ClassLoader.addURL parent called for http://voidchar.com/Other/DatRLTest.jar
basic: Plugin2ClassLoader.addURL parent called for http://voidchar.com/Other/SharedClasses.jar
security: Blacklist revocation check is enabled
security: Trusted libraries list check is enabled
network: Cache entry found [url: http://voidchar.com/Other/DatRLTest.jar, version: null] prevalidated=false/0
cache: Resource http://voidchar.com/Other/DatRLTest.jar has expired.
network: Connecting http://voidchar.com/Other/DatRLTest.jar.pack.gz with proxy=DIRECT
network: Connecting http://voidchar.com:80/ with proxy=DIRECT
basic: exception: illegal URL redirect.
java.lang.SecurityException: illegal URL redirect
at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.DeployCacheHandler.get(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.SecurityException: illegal URL redirect
basic: Dialog type is not candidate for embedding
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@acf892
basic: Loading Java Applet Failed...
security: Accessing keys and certificate in Mozilla user profile: null
security: Reset deny session certificate store
编辑:这是我用来加载小程序的 html 代码。
{applet width=800 height=800 archive='DatRLTest.jar,SharedClasses.jar' code='vc.voidwhisperer.datrl.main'}
{PARAM name="java_arguments" value="-Djava.net.preferIPv4Stack=true"}
{/applet}
小于和大于符号被替换,因为它不喜欢我试图把东西放在他们身上。
编辑#2:我已经对 jar 进行了自签名,这仍在发生。我还没有弄清楚如何解决这个问题..
最终编辑:经过几个小时的工作,我终于找到了一个解决方案,感谢 irc 频道中的一位朋友。以下是如何修复它的一般要点:
- 如果查看输出的特定行:network: Connecting http://voidchar.com/Other/DatRLTest.jar.pack.gz with proxy=DIRECT。
- 在查找该文件时,它不存在。
- 对文件类型进行一些研究,它是一个 pack200 jar,可以使用 jar 制作,然后用它执行以下操作:打开 cmd,然后输入“pack200 example.jar.pack.gz [JarLocation]”。
- 现在,将 example.jar 替换为您的 jar 文件的名称,但将 .pack.gz 保留在那里。
- 现在,将该文件上传到与小程序相同的目录并尝试再次加载小程序。
注意:确保小程序已签名!希望这可以帮助其他人解决我遇到的问题。