Truble ruinning applets in  IE 4.0

I've downloaded and installed The JDK 5.0 but i'm unable to run the applets in my
browser. I Get the following error:
java.lang.ClassNotFoundException: HelloWorld
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.run
     at java/lang/Thread.run
The Html File is:
<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
Here is the output of my program:
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>
The Class is found in the same directory as the Html File. So what's the
problem?

You need to specify the plugin to be used in your browser. In IE 5 and 6 you can do this in
Tools > Internet Options > Advanced Tab > Java check box
I don't know about 4. If you refuse to update your browser, you can specify the plugin in the HTML

Similar Messages

  • Security popup accessing applet with https

    I have a website that serves everything over https. One of the things being served is an applet. I've found that just before the first request is made for the applet's .class files, I get a popup from the Java plug-in saying:
    Warning - Security
    The web site's certificate has been verified. Do you want to continue?
    I'm not sure what this is trying to tell me, is this a problem or just a friendly message? I look at "More Information..." and it says that the cert being used was issued by a trusted company, and that it is valid.
    I'm lead to believe that Java is just being nice and telling me that I'm interacting with a site that has a good certificate. My problem is this stupid popup is going to ruin my demo. I want to turn it off, or do whatever is necessary not to get it. I've gone through the various Java settings, and can't figure it out.
    I do see that the second time I go to the site (after I clear the popup) I don't get a popup again. However, this doesn't help me because I'm generating certs on the fly, and every new one causes the popup to reappear.
    Any ideas on what I can do? I see that I'm using JRE 1.5.0_09 as my Java Applet Runtime version.
    Sander Smith

    By default applets can't read files off the hard drive.
    The easiest way to handle this is to put the images and other resources (such as properties files) in the same jar file as the classes, and then use Class.getResource or Class.getResourceAsStream to load them.

  • How to "Load" Applet class to current Applet?

    I have to write a simple Applet to detect the JVM version of the browser, and the flow is:
    1.Detector.class (Applet) load in a html page, its class version is 1.5
    2.It checks whether the JVM version of the browser is 1.5 / 1.6.
    3.If it is 1.5, a new browser window popup and links to jre download page.
    4.If it is 1.6, it loads a Main.class (Applet), which class version is 1.6
    My question is, if the codes inside the Detector.class detects the JVM version is 1.6, HOW can I LOAD the Main.class (Applet) to the current scene?
    Thanks for any suggestion and help.

    roamer wrote:
    ..My question is, if the codes inside the Detector.class detects the JVM version is 1.6, HOW can I LOAD the Main.class (Applet) to the current scene?
    Thanks for any suggestion and help.I suggest you change the flow.
    1. Go to the applet page with both the Main.class *&* the version check applet.
    2. If <1.6 is detected, have the version check applet redirect to the the 'download Java' page.
    Alternately:
    1. Go to the version check page.
    2. If 1.6+ is detected, redirect to the Main.class page, else redirect to 'download Java' page.
    I developed the [Version Check|http://pscode.org/jre.html] applet that can handle either of those alternatives.
    Another approach is to use the deployJava.js that checks Java versions before launching the applet.
    I also offer Wrapplet to do both the version checking and load 'child' applets. But note:
    1) With the other better alternatives, I have not looked closely at the code in a long while.
    2) Loading one applet in another is possible, but not easy.
    3) I half expect that each new Java micro-version will ruin it.

  • Applet repaint

    I have a problem when i resize the browser window. The part of the applet which used to be covered is left with ruined graphic.
    How do I solve this problem?

    In your html, capture the 'onresize' event of the browser. In onresize, you can use the capability that javascript can communicate with an applet. Call the repaint method of your applet from javascript trigger by onresize.
    Check out this link:
    http://java.sun.com/products/plugin/1.3/docs/jsobject.html

  • Signed applets called from javascript - how/where to load policy file?

    I'm running into some apparently well-known problems with signed applets accessing a client machine's hard drive.
    So, I can get things to work if I place the following two lines in my 'local' JDK installation:
    permission java.io.FilePermission "${user.home}/x.properties", "read,write";
    permission java.util.PropertyPermission "user.home", "read";These let me a) read the user's home directory and b) read/write a file that's located there.
    What I don't want to do is edit the java.policy file, but I'm having problems loading a separate policy file. The app server we run with our product is jetty, and I'm assuming I would be passing in the '-Djava.security.policy=='filename' with the other jetty start-up parameters- is this a correct assumption? And, what path do I give for the file, will I need to put it somewhere in the .war file we distribute, or in the JDK installation on the server? If it's on the server, will client machine's know about these extra rights?
    I'd REALLY appreciate any help I could get on this...
    thanks in advance,
    +0^^

    Maybe you didn't realize but my previous post was sarcastically ment:
    "hello SUN security stop bugging me in writhing this malicious program"
    and
    "hello SUN security, I'm a good boy now trust what I'm doing"
    Are in a practical sense exactly the same.
    SUN should either remove the stack check or the doprivileged. The stack check takes up
    valuable resources for nothing since a malicious program can easily circumvent that.
    Your post about a malicious user abusing your (CA) signed applet to ruine someone's
    system is correct, it would not be difficult. A CA signed applet will not even ask a user to
    trust or not. This is one of the reasons we have the usepolicy in affect, but this cannot be
    used on "grandma's old PC" since it's too complicated for users to do such things.
    YOU seem to be the one to blame, not the hacker! (The user accepted YOUR
    certificate!).Actually you are to blame, because you made software that exposes a vonurability
    other people can take advantage of.
    what you can do before calling the doprivileged private method is check the call stack.
    So your signed applet has a public method checking the callstack, if this lookes OK
    that method will call the private doprivileged method.
    Here is the example
    package t;
    import java.util.Properties;
    import java.applet.Applet;
    public class test extends Applet {
             public test(){
                   startingPrivileged();
             public void startingPrivileged(){
                   System.out.println("this is the stack");
                   try{
                        throw new Exception("get the call stack");
                   }catch(Exception e){
                        StackTraceElement stack[] = e.getStackTrace();
                        for (int i=0; i<stack.length; i++) {
                             System.out.println("file: " + stack.getFileName() + " method: " + stack[i].getMethodName() + " class: " + stack[i].getClassName() + " at " + new Integer(i).toString());
                        // this is a really simple check to see if this method was started from the t. package
                        // a good hacker can just create it's own package named t and take advantage of this method
                        // if this method was started from the same package there is no reason to make this method
                        // public, protected would work.
                        // there must be a better way to check if this method was called by "your" or "trusted" code
                        if(stack[1].getClassName().startsWith("t.")){
                             dosomePrivileged();
              private void dosomePrivileged(){
                   System.out.println("this is the method that does privileged stuff");
         public static void main(String args[]) {
              new test();

  • Slow applet--HELP!

    My entire project has skidded to a halt because of this problem, so I need help right away!
    The problem:
    A very simple applet is running very slowly. All it does is display a custom component.
    How can I speed it up without losing encapsulation?
    public class ArrowTest extends Applet{
       Arrow a = new Arrow();
       add(a);
    }The component is a lightweight custom component, which is also very simple. It has a anonymous listener class in its constructor (MouseMotionListener) which causes the Arrow to rotate when the mouse is clicked and dragged. (this involves lots of Math.cos, Math.sin, etc., but not THAT much) However when I dragged my mouse on the arrow's area, the rotation was slow and choppy. I would drag the mouse, and about 10 seconds later, the arrow would notice and flip right to where I ended, not showing the in-between steps.
    The applet ran fine (smoothly and with a fast response) on my computer in the applet viewer. It also worked fine when I ftp'd it to my html server and ran it. It worked badly at school, which is the ultimate destination of this applet. The school's computers are not much slower than my testing computer. I know that the html servers are extremely busy/slow, but I thought that the entire applet was loaded into memory so that once it was started, the server's business was done?
    Is there any case in which the applet needs to go back to the HTML server once it has loaded the applet?
    I had planned to put many such arrows on the screen concurrently, and even pack it into another custom component. But if I can't even display one arrow, my entire project is on the skids.
    How can I speed this up?
    Can I make it such that the user has to download pieces of my applet and store it on their computer somewhere, so that I can help this slow HTML server (so that it sends less info)?
    Thanks in advance!
    :) jenMc

    thank you for replying!
    However, I'm not sure what you're suggesting?
    The event handler, which is part of the component, calls repaint() (the component's paint and update methods). The rotation is intended to be packaged as part of the arrow's default behavior, in the same sense as a button's default behavior is such that if you click on a button you see the image of the button go "up and down". You do not assign a event handler to do this; it is part of the component. Supposedly when you do this, the applet only reloads the area within the clip bounds of the component?
    I do not want to draw an arrow by calling getGraphics(). That would ruin the encapsulation. Another words, I want to add an arrow to the screen by simply saying
    add(arrow);
    not by having to write an arrow algorithm every time I want to use an arrow, which is most of the time, since that's my base class for Vector, Force, Acceleration, Velocity, etc. classes.
    I don't want the caller to be responsible for repainting or painting or anything.
    Am I totally not understanding your suggestion? If I am, please correct me.
    :) Jen

  • Last firefox update 3/1/11 ruined pogo games, when are you going to fix YOUR problem?

    ever since last Firefox updates, most of the games at pogo.com will not work. I have to go to another e browser to play & it work there, so logically, it is Firefox that is in error. When are you planning to redo the botched update that ruined gaming on pogo? I am not the only person who has encountered this mess. I do not appreciate your lack of ability to contact your support group and you expect your customers to figure it out among themselves.

    This '''is''' Firefox support. A quick release to fix the Java applet problem should be coming in a few days via 3.6.15.

  • Setting path in applet

    Hello!
    I have an applet running ok in a html-page in Netscape, if I first set all my path, for example:
    setenv LD_LIBRARY_PATH ownlib:$LD_LIBRARY_PATH
    But I want it to be automaticaly set when anyone is entering the html-page. How do I do that? Where do I do that, in the html-code?
    All help appreciated.
    /Lina

    If your application requires that kind of access, then
    applets are not the appropriate technology. That
    doesn't make them meaningless, it makes them
    inapplicable to your particular problem.
    It's like complaining that calculus is meaningless
    because you can't use it in your tax returns. It's
    just the wrong tool.True, applets are not utterly without a purpose, but I am yet to encounter a situation where applets are the best technology available. The only instance I have seen where an applet has been useful is some science site where they had emulated the effects of an electron microscope. I don't even think this was technically image manipulation either, it was just a stored bank of possible combination images. Applets are so easy to implement in a poor way, and a fantastic way of ruining a website and the user experience due to long load times, JRE issues blah blah.
    Basically, applets fall down the gap between the usefulness of the web, and what people actually use it for. No-one has ever succesfully argued the point with me that applets fulfil some genuine purpose in a way that cannot be done better by other technologies. JSP (and other dynamic web technologies) does web better... webstart does app deployment better.

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

  • Open web pages from an applet

    I'm developing an applet that has to open some web pages.
    The only way I know is to use the method showDocument that
    needs and URL. So, how to pass parameters to the web page?
    I don't want to put them in the URL: everyone can see
    "secret data"!
    Help me, please.

    Take a look at this example that uses a JEditor pane to hold the HTML page.
    //Create a new JEditor Pane
    jep = new JEditorPane( );
    //Ensure the pane is not editable
    jep.setEditable(false);  
    //Use this to get local HTML file
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");
    //add the html page to the JEditorPane
    jep.setPage(fileURL);Ok the core line of code here is this.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");The standard method for accessing a html file via a URL is thus. As you can see its very similar.
    URL fileURL = new URL("http://www.comp.glam.ac.uk/pages/staff/asscott/progranimate/docs/Manual/Manual.htm");this.getClass().getResourse() will return the file location of the class you are working with.
    By doing the following you can access manual.html in a folder called Manual that sits in the same file location as the class file you are using.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");I hope this helps.
    Andrew.

  • Unable to load database driver from my applet's jar file

    I'm trying to set up an applet that will talk to a MySQL database. I have no problem connecting to the database as I'm developing the code ("un-jarred"), but when I create a jar file of my code to test through a web browser, I cannot connect to the database due to the usual ClassNotFoundException. I have included mysql-connector-java-3.1.12-bin.jar (the current driver) in the jar, but I don't know if I'm supposed to supply some info through an attribute to the applet tag to let it know that the jar contains the driver it needs or if I have to call the driver differently in my code.
    Any help is appreciated, thanks.

    The simplest approach is always the best. :)Abso-lutely.
    Awesome, that worked perfectly. I Included the extra
    jar file in the applet tag and now my applet makes
    some sweet lovin' to the database.And you have succeeded where thousands have failed. Congratulations.

  • Applet java file not refreshing in browser

    I have an applet that I am updating and I am not seeing the corresponding update when I open the web page. I can manually download the java class file and look inside it and it definitely is the updated file. I have deleted the browser history. (I am running tests with Firefox 3, IE7, and Safari 4 public beta). Is there something else I need to do to make sure the browser pulls in the latest version of the class file referenced in the html?
    Here is the code:
    <HTML>
    <HEAD>
       <TITLE>A Simple Program</TITLE>
    </HEAD>
    <BODY>
       <CENTER>
          <APPLET CODE="SendRequest.class" WIDTH="500" HEIGHT="150">
          </APPLET>
       </CENTER>
    </BODY>
    </HTML>The applet refers to a hard coded URL to read through a urlconnection. It is always reading a file and showing content, but it is not showing the right file. If I change the name of the referenced file in the java program, it looks like the browser has cached the referred file, rather than throwing and error and saying the file doesn't exist.
    Here is the java
    import java.applet.*;
    import java.awt.*;
    import java.net.URLConnection;
    import java.net.URL;
    import org.w3c.dom.Document;
    import java.lang.String;
    import java.io.*;
    public class SendRequest extends Applet {
        @Override
        public void paint(Graphics g) {
            g.drawRect(0, 0, 499, 149);
            g.drawString(getResponseText(), 5, 70);
        public String getResponseText() {
            try {
                URL url = new URL("http://myserver.com/stats/logs/ex20090603000001-72.167.131.217.log");
                URLConnection urlconn = url.openConnection();
                BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    urlconn.getInputStream()));
                String inputLine;
                String htmlFile = "";
                try {
                    while ((inputLine = in.readLine()) != null)
                        htmlFile += inputLine;
                    in.close();
                    return htmlFile;
                } catch (Exception e) {
                    return "Can't get the string.";
            } catch (Exception e) {
                return "Problem accessing the response text.";
    }Any help would be appreciated. I heard that some files may cache more persistently than others, but I don't fully understand the details.
    Thanks,
    Jim

    Check this [document loader example|http://pscode.org/test/docload/] & follow the link to sandbox.html for tips on clearing the class cache. That relates specifically to caching a refused security certificate, but class caching is much the same. As an aside, getting a console can be tricky in modern times (unless the applet fails completely). It is handy to configure the [Java Control Panel|http://java.sun.com/docs/books/tutorial/information/player.jnlp] to pop the Java console on finding an applet (Advanced tab - Settings/Java Console/Show Console).
    Of course there are two better tools for testing applets, especially in regard to class caching. AppletViewer and Appleteer both make class refresh fairly easy. Appleteer is the better of the two. I can tell you that with confidence, since I wrote it. ;-)

  • EJB 3.0 - Communicate an Applet with a Session Bean

    Hello
    I'm developing an EJB 3.0 app (eclipse and glassfish tools bundle), and I have an applet that has to use remote session beans.
    QUESTION: Is it possible for the applet to connect to EJB?
    QUESTION: By creating a J2EE application client project, can I use @EJB annotations to inject the session bean directly to the applet, avoiding the JNDI lookup?
    (since I imagine that the anwser to the second one is NO, I do the following consideration)
    Given an application client project, I imagine that this application can run remotely on a client machine/JRE. Then this application can use Annotations/injection facilities whenever it runs on a J2EE client container (which I assume consists of a set of libraries provided by the application server vendor, Glassfish in that case). Could this application be deployed using Java Web Start? If so, why can't it be deployed as an applet? (both options run in a client JRE, don't they?).
    QUESTION: In either case (applet or JWS), how do I have to package the JAR file (using Eclipse) so that it contains the needed libraries for accessing the EJB? Which are those libraries?
    At the time being, I'm trying to implement a sample application that follows the "Applet doing JNDI lookup" approach. I have:
    - an EAR project
    - an EJB project (containing an Entity Bean and a Stateless Session Bean with a @Remote interface)
    @Remote
    public interface HelloRemote {
         public String hello(String name);
    @Stateless
    public class Hello implements HelloRemote {
         @Override
         public String hello(String name) {
              return "Hello "+name+"!!";
    }- an Application Client project (containing the applet code):
    public class ClientApplet extends JApplet {
         public void init(){     
              try {
                   Context jndiContext = getInitialContext( );
                   HelloRemote server = (HelloRemote) jndiContext.lookup(HelloRemote.class.getName());
                   setContentPane(new JLabel(server.hello("Gerard")));
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         private Context getInitialContext() throws NamingException{
              Properties props = new Properties();
              props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
              props.setProperty("org.omg.CORBA.ORBInitialHost", "myhost");
              props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
              return new InitialContext(props);
    }- a static web project (with a sample web page that contains the applet object the corresponding applet JAR file)
    I tried to export the Application Client project as an "application client JAR", in the hope that the java EE libraries bundled with glassfish (listed as libraries of this project) would be packaged too.
    No success, so now I'll try to copy all the JAR files (one by one) into the +\WebContent\+ folder of the Web Project, and add references to each of them in the archive="" attribute of the +<applet>+ HTML tag. Although this might work, I suspect that I am missing the good/easy way of doing it. Any suggestions?
    Thanks in advance,
    Gerard
    Edited by: gsoldevila on May 6, 2009 7:09 AM

    An Applet can communicate with an EJB via JNDI lookup but I would (personally) use an intermediate Servlet to handle this. Client to Servlet communication is http whereas to ejb is iiop - which might be blocked.
    Injection only works in managed classes (EJB, Servlet, Listeners..) and an Application Client main class. So yes you could use an app client for handling resource injection.
    m

  • Error while accessing a public method of applet from javascript.

    Hi,
    I am getting "Object doesn't support this property or method" error
    when accessing a public method of applet from javascript in IE 6 using
    document.applets[0].myMethod();
    The same is working in IE 7.
    Thanks in advance.
    Regards,
    Phanikanth

    I don't know why it happens, but this works for me in both versions:
    <applet ..... name="MyApplet">
    </applet>and in javascript use
    document.MyApplet.myMethod()

  • Can not view applet in browser (IE5.5)

    only my appletviewer shows my very simple applet.
    in the IE5.5 i can not view my applet... ?
    my applet just have write a string...
    any help ?

    http://forum.java.sun.com/thread.jsp?forum=31&thread=276607

Maybe you are looking for

  • E-mail address added to incoming invitation

    Hello, Last time I get more and more invitiations in iCal (as expected, it's agreed with the sender). Thet send the invitation from either Outlook or Lotus Notes. When I look in the invitation not only my mail address is in it, but also the one of my

  • Web Dynpro Display PDF on Submit

    Friends, I have a requirement where I need to fetch PDF stored in table as RAWSTRING and display in Web Dynpro ABAP IFRAME container on the View Basically user access this application , from the drop down select the value and click submit, now it sho

  • UK bank - First Direct - prevents Safari accessing internet banking

    First Direct has just withdrawn access to its Internet Banking service for anyone using the Safari browser. No notice, no consultation, no explanation - just a screen saying (paraphrased) 'Safari not supported, go and get Firefox'. On calling the ban

  • Premiere Elements 11 (Windows 64 bit): Frequent glitches after rendering

    I am currently trying to render around 20 videos, around 12 hours in total duration (video lengths vary from 5 minutes to 105 minutes). Unfortunately, about 50% of the time, when i watch a newly rendered video, there will be some sort of graphical gl

  • IPad Facebook?

    Has anyone been able to get the Facebook SDK from http://code.google.com/p/facebook-actionscript-api/ specifically the mobile version working? I have had no luck whatsoever. Using Flash CS5.5 and AIR 3.1. I got the Desktop verison working with modifi