Sun.applet.AppletViewer vs. appletviewer

What's the difference between sun.applet.AppletViewer and just plain appletviewer. I recently had a problem with sun.applet.AppletViewer and I just wondered what the difference between the two is. I've looked around on the forum and conducted a search on the java.sun.com website. I can't really find any documentation on sun.applet.AppletViewer.
Thanks,
Lisa

I presume that they are the same? i.e. sun.applet.AppletViewer is the class that is used when you run appletviewer
How come you're using sun.applet.AppletViewer anyway if there's no docs for it? :)

Similar Messages

  • How to find sun/applet/AppletViewer class?

    Hello, everyone,
    I have successfully deployed Form Server Applications in several
    ways as following:
    1. Using Jinitiator 1.1.7.11 plug in to run Forms inside Web
    browser in Windows 98 OS &IE4.0 SP1.
    2. In Windows 98 OS DOS Command prompt line,using Appletviewer
    to run remote NT
    Server's Forms application with format: C:\>Appletview
    http://appserver:9999/webhtml/example.html. The
    form runs smoothly in a AppletViewer window.
    3. In NT4.0 OS SP3, run form inside IE4.0 SP1 browser without
    Jinitiator 1.1.7.11 plug in program, but I
    must set CLASSPATH Env variable including
    C:\ORANT\JDK\LIB\CLASSES.ZIP & C:\ORANT\FORMS60\JAVA, or else
    the error message shows: class no found:sun/applet/appletviewer.
    But I even encounter some problem:
    1. In the above first way, jinit.exe(Jinitiator 1.1.7.11
    version) can not run in my NT4.0 SP3 OS. So the
    above first way of running Form can only succeed in my Windows98
    OS. Has anybody installed jinit.exe
    successfully in NT4.0 SP3?
    2. In the above third way, I try to run Form inside my IE4.0 SP1
    in Windows98 OS. I tried to set the
    CLASSPATH correctly as above describled, but I failed. I always
    got the above mentioned error message. I
    don't know why in windows98 the appletviewer class can not be
    found but in NT it can.
    Anyone can help me out? Thanks in advance.
    Robby
    null

    but problem is:
    the class name is a string "JFrame", which is
    how to solve the problem?It is simply not possible.
    If you have javax.swing.JFrame, you can use Class.forName(). But then you've already got the package.
    Beyond that, if you've ever decompiled code, you'd have seen that import statements don't exist in bytecode and all class references are by their full names. There is no facility in java to get the list of loaded classes, or to search for a class this way

  • Applet works in appletviewer but not in IE - Applet notinited

    Hi, i have written a simple applet which uses swing components, ie swing labels and buttons. The buttons and labels also have icons with the text. The icons are in a folder called "icons" inside the same folder that the class is in. Everything works fine in the appletviewer, the icons are all displayed correctly, however when i try to open it through Internet Explorer i get this error in the java console window:
    Java(TM) Plug-in: Version 1.4.0
    Using JRE version 1.4.0 Java HotSpot(TM) Client VM
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    java.security.AccessControlException: access denied (java.io.FilePermission icons/world.jpg read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
         at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:408)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:422)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
         at atm.init(atm.java:23)
         at sun.applet.AppletPanel.run(AppletPanel.java:341)
         at java.lang.Thread.run(Thread.java:536)
    Can anyone help me with this problem? I desperately need this applet working in the browser and not just the appletviewer.
    Many thanks in advance,
    Adrian

    Hi, i don't think it is a problem with the security settings, the problem definately lies in these lines
    inside the init method:
         Icon worldIcon = new ImageIcon(getDocumentBase(),"icons/world.jpg");
         JLabel myIconLbl = new JLabel("My Icon and Label", worldIcon, SwingConstants.CENTER);     
    add(myIconLbl);
    If i take the ' getDocumentBase() ' part out of the first line, the applet compiles and the worldIcon is correctly displayed in the appletviewer but not in Internet Explorer (the problem i orriginally sited).
    However by leaving the getDocumentBase() line in the code, the applet correctly compiles but does not show the icons at all in either appletviewer or IE!!
    Any suggestions?
    Adrian

  • NullPointerException at sun.applet.AppletPanel.findAppletJDKLevel

    Hi,
    we have a online HTML page containing an <applet> and different <iframe> definitions. By clicking a HTML link or calling Applet.getAppletContext().showDocument(), other HTML pages containing other applets are loaded into the referenced frame. All applets have identical archive and codebase attributes, allowing them to communicate with each other.
    This works actually very well. The problem is that sometimes newly loaded applets do not start, and a red cross appears in the inner frame. In all cases, the following exception appears in the java console (which does not happen if everything works fine):
    java.lang.NullPointerException
    at sun.applet.AppletPanel.findAppletJDKLevel(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    We experienced this on customer clients using
    - Windows XP or Vista
    - SUN Java 1.6 (e.g. Java 1.6.0_02), Java 1.5 worked so far
    - Firefox2, IE6, IE7
    Any ideas?
    We use the JarIndex mechanism to enable dynamical class loading, could that cause problems?

    After installing JRE1.6.0_02, the problem occured now as well, but didn't occur under the previously JRE1.5.0_07 version.
    For me, it seems to be some classloader related timing problem and occurs even in the following scenario:
    I have a main frame m, containing an inner frame a with applet A and an empty inner frame b.
    1. at startup, A gets loaded into a. A starts well.
    2. A loads a second Applet B via <applet> into b. B starts well.
    3. Click HTML button within m loads a third Applet C via <applet> into b. Using Java 1.6, B does sometimes not start (see first post)
    4. Click HTML button within m loads B via <applet> into b. This works.
    5. Click HTML button within m loads C via <applet> into b. This works sometimes, sometimes not.
    So, the class needed at that moment (whatever that is) is actually available but cannot be loaded properly at first start for some reason.
    As said before, codebase and archive tags are exactly the same. Javascript is not used at all. I couldn't set up a test environment to simulate this effect, so I'm sorry that I couldn't supply any code example.
    Does anyone could give me a hint please?

  • Java.lang.NoSuchMethodError:sun.applet.AppletPanel.changeFrameAppContext

    What does this mean?
    java.lang.NoSuchMethodError:sun.applet.AppletPanel.changeFrameAppContext(Ljava/awt/Frame;Lsun/awt/AppContext;)V
         at sun.plugin.viewer.IExplorerPluginObject.appletStateChanged(Unknown Source)
         at sun.applet.AppletEventMulticaster.appletStateChanged(AppletEventMulticaster.java:32)
         at sun.applet.AppletPanel.dispatchAppletEvent(AppletPanel.java:233)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:532)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    and where does it occur?
    thanks in advance, ulrich

    I've started seeing this as well since installing 1.4.2. Anyone have any ideas on this?
    What does this mean?
    java.lang.NoSuchMethodError:sun.applet.AppletPanel.chan
    eFrameAppContext(Ljava/awt/Frame;Lsun/awt/AppContext;)V
    at
    sun.plugin.viewer.IExplorerPluginObject.appletStateCha
    ged(Unknown Source)
    at
    sun.applet.AppletEventMulticaster.appletStateChanged(A
    pletEventMulticaster.java:32)
    at
    sun.applet.AppletPanel.dispatchAppletEvent(AppletPanel
    java:233)
    at
    sun.applet.AppletPanel.runLoader(AppletPanel.java:532)
         at sun.applet.AppletPanel.run(AppletPanel.java:293)
         at java.lang.Thread.run(Thread.java:536)
    and where does it occur?
    thanks in advance, ulrich

  • Sun.applet.appletPanel.run() is invoked twice when applet is loaded.

    When I am loading my applet in the browser, sun.applet.appletPanel.run() function is invoked 2 times according to JProfiler.
    How can we solve this problem to reduce the number of calls to one???
    TIA
    Ashish

    Anyone having slightest of idea about this problem please reply....

  • Applet works on appletviewer but not browser

    Hi,
    I have just started using Java. I'm so new the only program I've tried to compile and run is "Hello World". I'm already having problems running the applet. I'm using Java 2 SDK on Windows 2000. The applet works just fine on appletviewer, but I can't get it to work on Netscape or MS Internet Explorer. What am I missing?

    posting stuff like the error message you get, and a section of the html page might help.

  • Midi synthesizer applet working with appletviewer , but no in IE browser

    Hi ,
    The following code works OK using appletviewer , but not working with IE browser . The user can play notes from C to G , using the corresponding keyboard keys (only when typing small A,B,C,D,E,F or G , a corresponding midi note would be produced) .
    When running it using appletviewer , the notes are being heard ;
    this isn't the case when running the applet using IE browser (after removing the security warning (of showing active content) - here , the applet simply doesn't respond to the key events .
    The code is :
    import java.awt.event.*;
    import javax.swing.*;
    import javax.sound.midi.*;
    public class RandomNotes extends JApplet implements KeyListener
         private MidiChannel midiChannel;
         private int note ;
         private long timeWhilePress;
         private long timeAfterPress;
         private int firstTime = 0;
         public void start()
              try
                   Synthesizer synthesizer = MidiSystem.getSynthesizer();
                      synthesizer.open();
                  midiChannel = synthesizer.getChannels()[0];
              catch(Exception ex)
                   ex.printStackTrace();
              addKeyListener(this);
         public void keyPressed(KeyEvent e)
              firstTime++;
              switch (e.getKeyChar())
                   case 'c':
                        note = 60;
                        break;
                   case 'd':
                        note = 62;
                        break;
                   case 'e':
                        note = 64;
                        break;
                   case 'f':
                        note = 65;
                        break;
                   case 'g':
                        note = 67;
                        break;
                   case 'a':
                        note = 69;
                        break;
                   case 'b':
                        note = 71;
                        break;
                   default:
                        note = -1;
                        break;
              timeWhilePress = System.currentTimeMillis();
              if (firstTime == 1)
                   midiChannel.noteOn(note, 127);
         public void keyReleased(KeyEvent e)
              timeAfterPress = System.currentTimeMillis();
             try
                   Thread.currentThread().sleep(timeAfterPress - timeWhilePress);
              catch (InterruptedException exception)
                   exception.printStackTrace();     
            midiChannel.noteOff(note);
            firstTime = 0;
         public void keyTyped(KeyEvent e)
    }Why it runs OK using appletviewer and not under IE browser , and how can I correct the problem please , so under IE browser , the applet should respond to key events ?
    Thanks in advance ,
    Lior .

    The problem is related to the Midi itself , not to the keyPressed event - I've just checked it :
    If I add a JOptionPane.showMessageDialog(null,"Lior"); statement
    as the first line of the keyPressed method ,
    then also when running the applet under IE browser , when clicking on any letter character (eg. "j") , I see the "Lior" message appears on screen . So the problem is not with the keyboard event handling , but something related to the Midi itself .
    If you don't mind , I should post this question also in the Java sound forum (unless this is considered a crosspost , then I'll not do that) .
    Thanks in advance ,
    Lior .

  • Applet ok with appletviewer not ok with browser!!

    The applet run fine with the applet viewer.
    When I tried to run the applet from browser I got the following.
    Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
         at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:259)
         at javax.media.j3d.Alpha.<clinit>(Alpha.java:1005)
         at HD3.createSceneGraph(HD3.java:161)
    On this computer I am sing 1.6.02 jre. On another computer which I have 1.5.05 jre the same code run with applet viewer and browser without problem.
    Any one can suggest a possible cause of error.
    Thanks

    What kind of jvm are you using in IE? It is possible that IE is either using it's internal JVM, which doesn't care diddly about policy files, or are using a plugin that looks for the policy file in a different place than your appletviewer does.

  • Terrible performance of applet with firefox & appletviewer (not IE)

    I'm working on a worm game with the help of a book on the subject. It's not finished yet, the worm can only move around & stop when hitting a wall. Now as I add the g.drawImage(blahblah) to the paint-method, the performance gets terrible, the mouse responds every 2 seconds and painting errors occur in the applet. I can barely manage to get the appletviewer closed.. The weird thing is, that the applet works smooth on IE, but not on firefox nor appletviewer... Here's the code, "translated" to english with find & replace for your convenience. The worm.java -file is not included, only the main wormgame.java
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class wormgame extends Applet implements Runnable
         Thread Thrd;
         worm Worm;
         Image Background;
         boolean Loaded;
         public void init()
              Worm = new worm(27, 1, 3);
              Background = getImage(getCodeBase(), "tausta.jpg");
              Image ImageToMemory = createImage(size().width, size().height);
              Graphics ImageToMemoryKP = ImageToMemory.getGraphics();
              ImageToMemoryKP.drawImage(Background, 0, 0, this);
              Loaded = false;
              addKeyListener(new WormListener());
         public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
              if(infoflags == ALLBITS)
                   Loaded = true;
                   repaint();
                   return false;
              return true;
         public void update(Graphics g)
              paint(g);
         public void start()
              if(Thrd == null)
                   Thrd = new Thread(this);
                   Thrd.start();
              requestFocus();
         public void run()
              while(true)
                   Worm.move();
                   if(Worm.isDead())
                        Thrd.suspend();
                   repaint();
                   synchronized(this)
                        try
                             wait(200);
                        catch(InterruptedException e)
         public void paint (Graphics g)
              if(Loaded)
                   g.drawImage(Background, 0, 0, this);
                   showStatus("Finished.");
              else
                   showStatus("Loading gfx...");
              Worm.piirraWorm(g);
              requestFocus();
         class WormListener extends KeyAdapter
              public void keyPressed(KeyEvent e)
                   switch(e.getKeyCode())
                        case KeyEvent.VK_LEFT:
                        if(Worm.parts[0].direction !=Worm.RIGHT)
                             Worm.turn(Worm.LEFT);
                             repaint();
                        break;
                        case KeyEvent.VK_RIGHT:
                        if(Worm.parts[0].direction !=Worm.LEFT)
                             Worm.turn(Worm.RIGHT);
                             repaint();
                        break;
                        case KeyEvent.VK_UP:
                        if(Worm.parts[0].direction !=Worm.DOWN)
                             Worm.turn(Worm.UP);
                             repaint();
                        break;
                        case KeyEvent.VK_DOWN:
                        if(Worm.parts[0].direction !=Worm.UP)
                             Worm.turn(Worm.DOWN);
                             repaint();
                        break;
         }

    Just noticed that it won't work with IE either anymore.. My friend got it working, sounds like there's sth matter with my system? I have the latest jre & jdk, just reinstalled them due to this (didn't help).. here's the address for the applet: http://acdx.net/matopeli/matopeli.htm

  • Applet Displays in Appletviewer but not on Web Page?

    My applet appears and functions fine when I view it under applet viewer. However, when I try to open and view the applet on a html page that includes it, nothing displays. Can someone help me out?
    Class of Applet:
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    public class PeteApplet extends JApplet
              PetePanel pete;
              public void init()
                        pete = new PetePanel();
                        this.setSize(452,146);
                        JPanel pane = new JPanel();
                        pane.setLayout(new GridLayout(1,1,15,15));
                        pane.add(pete);
                        this.setContentPane(pane);
                        this.setVisible(true);     
    HTML Code:
    <HTML>
         <HEAD>
              <TITLE>Java 21 Days - Day 13 Exercise 1</TITLE>
         </HEAD>
         <BODY BGCOLOR="WHITE">
         <APPLET CODE="PeteApplet.class" height="146" width="452">
         This applet requires a Java-enabled browser.
         </APPLET>
         </BODY>
    </HTML>

    which browser are u using ?? try netscape and see if u get the same error

  • Problem with appletViewer.exe

    After installed JDK1.4.1 on my system (Win2000, SP3), I tried to run a very simple java applet. But I got the exception like the following:
    F:\javaTest>appletviewer Hello.html
    Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgA
    pletViewer, key appletpanel.badattribute.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:755)
    at sun.applet.AppletPanel.init(AppletPanel.java:190)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:177)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:82)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1122)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1056)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)
    Anyone has idea what's the cause?
    Thanks in advanced.

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Bappletviewer%2C+%2B%22find+resource+for+bundle%22&col=javaforums&x=25&y=9

  • HELP error when appletviewer runs! not a typing error, desperate!

    ahoy chaps, having a slight problem with the old java ....when i go to view my applets i get this error message, please help as im under pressure to hand in a project for my masters....
    C:\j2sdk1.4.1\program1>appletviewer L1Appl1.html
    Exception in thread "main" java.util.MissingResourceException: Can't find resour
    ce for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute
    .exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:
    39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:684)
    at sun.applet.AppletPanel.init(AppletPanel.java:184)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
    a:80)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1062)
    at sun.applet.AppletViewer.parse(AppletViewer.java:996)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)

    emmmm
    check your work folder, and... the HTML code...
    good luck!
    Alvaro
    http://zetazof.tuportal.com

  • Appletviewer is not working

    i have write a small applet program to display the message "hello java". And I try to run the program on the appletviewer but it is not working and giveing the following error. If I run this application on the Internet Explorer it is executing
    The Error is:
    Exception in thread "main" java.util.MissingResourceException: Can't find resour
    ce for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute
    .exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:326)
    at java.util.ResourceBundle.getString(ResourceBundle.java:286)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:
    39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:857)
    at sun.applet.AppletPanel.init(AppletPanel.java:193)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:177)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
    a:82)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1122)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1056)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)

    Show us what's written in the applet code.

  • Error Message in Applet

    Does anyone know what could cause the following error message?
    I have tried putting "System.err.println("Test");" into my code, so that when I run it in TextPad I can see what is going on. However, even if I put it as the first line of init, nothing appears!
    Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:39)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:666)
    at sun.applet.AppletPanel.init(AppletPanel.java:182)
    at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
    at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:80)
    at sun.applet.AppletViewer.parse(AppletViewer.java:1062)
    at sun.applet.AppletViewer.parse(AppletViewer.java:996)
    at sun.applet.Main.run(Main.java:138)
    at sun.applet.Main.main(Main.java:80)
    Any suggestions would be much appreciated.
    JB

    It is because you have in html applet tag parameter "with" or "height" set to xx% and it should be set to exact value when you run applet in appletviewer.

Maybe you are looking for

  • How do I change the name of my computer

    How do I change the name of my new iMac, my wife set it up and she named it wrong and I want to name i differently. Now I have 2 computers on the network with her name as the computer name at least one has an 's after the name, but I just want a tota

  • [svn:fx-3.x] 8580: Minor ASDoc edits

    Revision: 8580 Author:   [email protected] Date:     2009-07-15 08:40:13 -0700 (Wed, 15 Jul 2009) Log Message: Minor ASDoc edits QE Notes: None Doc Notes: None Bugs: - Checkintests: Passed Modified Paths:     flex/sdk/branches/3.x/frameworks/projects

  • Secure download src? SSL and ADE

    Is it possible to package and epub with the src being an https? I know this is no problem during the packaging, but Digital Editions isn't able to download files over SSL. If you attempt this ADE thinks that the file src in the fulfillment token does

  • Standard iView to display email from Outlook web access

    Hi, Is there any standard iView available in EP which will display all mails functions in EP like Outlook web access. I don't want display Outlook webaccess inside portal as URL iView. Look and Feel should be like Task iView... Please suggest. Thanks

  • Aboutbdc

    higurus, while iam processing BDC session system is crashed iwant toknow howmanyrecords have successfully uploaded. how about doing it.how to resehedule the failed ones. does call transaction methos returns SY-subrc orsession method returns explain.