简体   繁体   English

网路小工具无法在Chrome中使用

[英]networking applets not working in chrome

I have recently created a Java applet which creates a socket and performs some networking functions. 我最近创建了一个Java applet,该Java applet创建一个套接字并执行一些联网功能。 The applet works fine when run in an applet viewer . applet查看器中运行时,applet可以正常工作。 But when i try to run it in a google chrome , it is launched but its not performing the desired function. 但是,当我尝试在谷歌浏览器中运行它时,它已启动,但未执行所需的功能。

I used (ofcourse) java.net library and my applet runs without a main method.(Old applets unlike swing components ). 我使用了(当然) java.net库,并且我的applet在没有主要方法的情况下运行(旧的applet与swing组件不同)。

Is not having a main method a problem ??? 没有主要方法有问题吗? Please help :) thanx 请帮忙:) thanx

Actually after a bit of research i came to know that Java applets have many restrictions due to security reasons... which include specially on creating the SOCKETS!! 实际上,经过一番研究后,我发现Java小程序由于安全原因而受到许多限制……其中包括专门用于创建套接字! . If you really wanted to communicate using Applet then you have to run it independently, to accomplish this you should have the applet digitally signed which is too tough to obtain. 如果您真的想使用Applet进行通信,则必须独立运行它,要实现此目的,您应该对Applet进行数字签名 ,这很难获得。

Instead you can create the JAR version of the applet and then convert into exe application using jar2exe converter and use it. 相反,您可以创建applet的JAR版本,然后使用jar2exe转换器将其转换为exe应用程序并使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM