This applies to subclasses of Applet, Servlet, Midlet, etc.
Why do they not need a main()? If I wanted to create a Craplet class that starts at init() or something similar, is it bad design, or how would I go about doing it?
...
Every time we update our Java application (Java client and Java server) we have the problems that some clients approx. 1% - 2% does not load the new jar files. This occur with applets and also with Java Web Start. If you clear the Java Cache then all is working correct.
Any idea why Java does not check for new jar files on every start?
...
The following applet is compiled and packed into jar which is then signed with a self-signed cert.
import java.applet.Applet;
import java.io.File;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
public class Test extends Applet {
private static final...
I have the following method in my applet:
public File[] getFiles()
Which I call from Javascript as follows:
var files = applet.getFiles();
for (var i = 0; i < files.length; i++) {
// Do something.
}
This works in Firefox but IE gives me
'length' is null or not an object
Any ideas anyone?
...
I'm trying to display a Java applet in a page on a Grails server. I'm using Sun's handy Javascript snippet for displaying applets:
<script src="http://java.com/js/deployJava.js"></script>
<script>
deployJava.runApplet({codeBase:"${createLinkTo(dir:'applet', absolute:'true')}",
archive:"${createLinkTo(dir:'com/steve/applet',...
So I am creating this applet which I want to have full on swing components in it. I have looked at all the docs, I have made the applet, and I can get something to show up in it if I override the update(Graphics g) method, but simply adding components to the contentPane doesn't seem to be doing it! What am I doing wrong?
import javax....
I want to make an Applet write to a text file. I think have overcome the security problem with my own certificate, but the text file isn't receiving the output.
My Applet can be seen at tomrenn.com/fallball, and should ask if you trust the certificate.
I'm not sure an Applet can write to a text file within the web hosted contents, so I...
How do i deploy a java applet for modern browsers?
I know there are somehow 3 possibilities but nobody tells me which one to prefer and how to use them.
Does somebody have any resources on that? i cant find any :(
...
(How) is it possible to let the user store a file (via save file dialog) on the local harddrive via a java applet?
Is there any workarounds for this or do I have to apply for some sort of certificate somewhere?
For example, when printing from a Java Applet the user gets a dialog asking for permission, is it possible to do something sim...
I need to open an external window from a Java applet. How can I do it without making the window a child of the applet? I need the window to stay open even when the applet is closed. I know it can be done. Bang! Howdy does exactly what I'm trying to achieve.
http://www.banghowdy.com/launch.html
...
My Java applet fails to show HTML-encoded (’) on JTextPanel panel randomly. Is this a JRE-specific bug? It works OK with my test pc but the customer has a problem that encoding is shown on GUI.
...
I'm new to Java (I come from an ActionScript background) and I'd like to know if there's a way to download and monitor the download progress of remote jar files inside an applet, then use the classes and other resources that are inside the downloaded jar. I know there's a JarURLConnection class, but I could not find a way to monitor the ...
Signed Java Applets have the same security clearance as a normal Java application running on the client. For a particular project, I need these permissions, and I need to perform privileged operations as a result of a JavaScript call.
Now, the problem is that, at least for Firefox 3 in Ubuntu (target browser and platform), when an apple...
What's the difference between a .class file and a .java file? I am trying to get my applet to work but currently I can only run it in Eclipse, I can't yet embed in HTML.
Thanks
**Edit: How to compile with JVM then?
...
Hi, I am trying to play audio in a Java applet but it is not working. What could be the problem?
EDIT: Besides the limited number of files that Java can play, the problem was that I didn't realize that the bin folder (in Eclipse workspace) contains the .class file that is run. So my code referring to the getDocumentBase() couldn't find...
I know how to deploy an applet using applet, object, embed tags and JavaScript, but I'm after the best approach (in terms of end user experience).
Sun suggests using the applet tag, and a mixed embed / object tag on the same page.
What I am considering is the following:
Cross-browser support.
Fallback to download page if incorrect Ja...
Currently I had developed an applet. Applet basically uses java.awt.Robot package for capturing screen. I want to store captures images locally. I had signed my applet jar. Still when applet tries to write file into local system it gives access error. Is there any way by which I can write file in local file system without modifying polic...
In our application(applet) I want to enable export functionality if one of the required jars is found. I do not want to add this jar applet references to avoid download size.
I am using Class.forName with one of the classed to check whether particular is available. In local machine Class.forName call retruns an instance although the jar...
I am having a hard time figuring out how to show an Image (or ImageIcon) in a Java applet. The following is my code. The picture (test.bmp) does exist and is on the D drive but when I run this I get the applet window with nothing in it. Can somebody tell me what I am missing to make the ImageIcon show?
public class Form1 extends JAppl...
I have a button on my applet (contained in a browser) that I would like to make reload or refresh the entire applet one of two ways:
Refresh the applet itself without having to refresh the browser
Refresh the entire browser
Is this possible from within the applet?
...