applet

How to kill Java-Applet beeing in a loop when browser is closed?

冷暖自知 提交于 2019-12-25 03:24:30
问题 I have a Java Applet to show images. I have a while true loop in paint() in order to permantly receive new images via tcp/ip socket. Now I have the problem, that the app is still requesting new Images from the server, even when the tab is closed. How can I fix that? 回答1: Just to make it clear: I have a while(true) loop in paint() in order to permanently receive new images via tcp/ip socket. Don't do this . The paint method should never block for a longer time frame. It should only paint your

Java applets in windows store apps

半城伤御伤魂 提交于 2019-12-25 03:24:26
问题 I have a java applet and i'm developing a windows store app. I want to integrate my applet to this application. Is this feasible.. if yes... can you tell the process. Thanks, Harsha 回答1: You won't be able to run this within a Windows Store application since plug-ins (you'd need Java installed) are not allowed for WebView (or for the non-desktop version of IE 10 in general - Flash excepted for some sites). 回答2: It is not possible at the moment. When you were installing Java you must have

Applet not able to access NetworkInterface.getHardwareAddress() api

空扰寡人 提交于 2019-12-25 03:14:46
问题 I have a requirement wherein I want to read the mac address of client m/c using an applet. But after some googling I found that applets run in a protected sandbox mode and can't have access to NetworkInterface.getHardwareAddress() api. And because of that I am not getting mac address when applet runs in browser where as i get the mac address when applet runs from Eclipse. Please let me know way so that applet can get access to NetworkInterface.getHardwareAddress() api. 回答1: You need to grant

Javascript call java applet signed

北慕城南 提交于 2019-12-25 02:44:47
问题 My function applet public String sign(String data) { String rs = ""; if (data != null && !data.isEmpty()) { loadKeyStore(); if (lsCertificateId.size() > 0) { selectCertId(); //doSign if (password != null && !password.isEmpty() && selectedId != null && !selectedId.isEmpty()) { byte[] signedData = doSign(data.getBytes()); rs = Base64.encode(signedData); } } } return rs; } I call function applet from javascript, I had allowed Java (TM) run on browser <html> <head> <title>TODO supply a title<

Why can multiple applets access one global class?

半腔热情 提交于 2019-12-25 02:10:51
问题 So I have a fairly complex applet structure from a couple years back, and I have a question about a global class that is in it. Basically, I have three applets on the same page and they interact with each other in different ways. The part I'm confused about is the fact that they all share global (static) variables from the same class. How exactly is this happening? I was under the impression that each applet would have its own little environment and would thus be unable to access the same

Specifying attributes in the <applet> tag

孤者浪人 提交于 2019-12-25 01:21:51
问题 We have an applet, a jar file that is stored on the desktops and one of the pages of a portal site calls this applet. We have issues with the applet not initialising in some of the environments and the investigation led to checking the tag where the jar is called. We are not sure whether we need to use the 'codebase' attribute in the tag. (And we can't just test it easily unfortunately.) What we have so far in the applet tag is the 'code' attribute that is specified and the 'Archive'

JApplet Not Stopping or Reacting to Keyboard Input

青春壹個敷衍的年華 提交于 2019-12-24 20:17:11
问题 I've been messing around with awt/swing lately trying to learn how to do applets. I have written the following short JApplet example code, which on the surface seems to work. The problems I have occur when I try to exit it: Pressing ESC does nothing, in fact line 38 is never reached when I run it in the debugger (nor is line 94 - it seems as if the overridden function processKeyEvent(KeyEvent e) is not being called by the applet runner upon keypress at all). However, mouse events do seem to

How to embed a Java Applet from another website (can't link their class file and jar)

江枫思渺然 提交于 2019-12-24 19:03:13
问题 In addition to what my title says, I am running into problems because their class file is linked as follows: "var attributes = {code:'xx/xxxx/xx/xx/xxx/xxx/xxxxx.class' width:645,height:443,archive:'xxxxx.jar'}" First, I naively copied the HTML code and it did show a Java Applet Object, but couldn't load it because it obviously didn't find the class. I tried many different addresses to see if I can download the class, but with no success. Does this mean the class can't be downloaded? I'm in

Why is my applet throwing an AccessControlException?

眉间皱痕 提交于 2019-12-24 16:35:06
问题 I am trying to build a Java applet, called game , which is something I have never done before (I've always just built standalone applications). My applet works fine when I test it in Eclipse, but when I try putting it on my website, I get the following error in the console: java.lang.reflect.InvocationTargetException at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(DeployAWTUtil.java:116) at sun.plugin2.applet.Plugin2Manager.runOnEDT(Plugin2Manager.java:3541) at sun.plugin2.applet

Running a Java applet on a website

假如想象 提交于 2019-12-24 16:26:09
问题 I have created a Java game using Eclipse. It has 11 classes (with one main class that calls everything else). I called it as an applet in the following manner: <!-- This is the applet handler to load the Handler Class to run the game --> <td colspan="3"><applet code="Handler.class" codebase="History Adventure Alamo Adventure/" name="Alamo Battle Adventure" width="680" height="509" archive="Handler.jar" id="Alamo Battle Adventure"> </applet></td> With it uploaded to the website, it shows an