Reloading an applet closes Netscape 7.0 browser

I'm loading an applet that loads an image web cam with JMF api. Everything works o.k. But after using the applet, if i go to another html page, loads it but the Netscape browser closes. I've looked at the Netscape java console and it gives me all these errors. Could anybody help me please, it's very urgent?
I don't know how to solve this problem. Here's the code of my applet.
import java.applet.*;
import java.awt.*;
import java.net.*;
import javax.media.*;
import java.awt.event.*;
import javax.swing.*;
public class AppletSound extends JApplet {  
     MediaLocator mySound=null;
     Player soundPlayer=null;
Component auControlComponent = null;
     String audio=null;
     public void init()
          audio=getParameter("audio");
          getContentPane().setLayout(null);
          setSize(300,50);          
     // Check that we have a valid URL and create URL object to hold it.
          if(audio.equals(""))
               System.out.println("*Please specify one URL to play*");
          else     
               mySound=new MediaLocator(audio);     
try {
          soundPlayer=Manager.createRealizedPlayer(mySound);
          catch(javax.media.CannotRealizeException cre){}
          catch(javax.media.NoPlayerException npe){}
          catch (java.io.IOException e) {
System.out.println("IOException...exiting.");
//System.exit(1);
if (soundPlayer == null) {
System.out.println("soundPlayer is null...exiting.");
// System.exit(1);
          auControlComponent=soundPlayer.getControlPanelComponent();          
          if (auControlComponent!=null)
          getContentPane().add(auControlComponent);
          auControlComponent.setBounds(5,5,295,40);
validate();
     public void start()
          if(soundPlayer!=null)
          soundPlayer.start();
public void stop()
soundPlayer.stop();
     soundPlayer.deallocate();
Here are the errors that I get from the Java Console:
java.lang.NullPointerException
     at com.sun.media.rtp.RTCPTransmitter.makereports(RTCPTransmitter.java:225)
     at com.sun.media.rtp.RTCPTransmitter.report(RTCPTransmitter.java:129)
     at com.sun.media.rtp.RTCPReporter.run(RTCPReporter.java:215)
     at java.lang.Thread.run(Unknown Source)
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
     at java.util.Vector.elementAt(Unknown Source)
     at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:114)
     at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:137)
java.lang.InterruptedException
     at java.lang.Object.wait(Native Method)
     at java.lang.Object.wait(Unknown Source)
     at com.sun.media.rtp.SSRCCacheCleaner.run(SSRCCacheCleaner.java:157)
     at java.lang.Thread.run(Unknown Source)
Timer: timeLoop() wait interrupted java.lang.InterruptedException
Timer: timeLoop() wait interrupted java.lang.InterruptedException
MediaNode event thread java.lang.InterruptedException
MediaNode event thread java.lang.InterruptedException
MediaNode event thread java.lang.InterruptedException

It's me again altairforodigital, as you can see in the source code of the applet I load sound not a web image. Sorry for that.

Similar Messages

  • Close browser window when applet closes (seperateFrame=True)

    Hello,
    Does anyone know a way to close the parent browser window when the java applet closes when the config setting seperateFrame=True?
    Thanks

    Do a little search in the forum, there are 100s of solutions on how to close the browser window.

  • Reloading an Applet

    Anyone know how to reload an applet in IE after changing the class files without having to close the browser window?

    It should reload if you refresh IE - either <F5> or menu View/Refresh or right-click/Refresh

  • Java Applet crashes Netscape upon Exit?

    Hello, I created an Applet that I am opening in NEtscape. When I make an attempt to exit (i.e. destroy) the APplet, it crashes the whole netscape. It even happens within Netscape 7. Is there a way around this since it makes a big problem for me to use the applet if it is going to crash my Netscape browser. I`ll appreciate any suggestions or comments, thanks Ivan

    The main class that everything is in is called GUI.java and it is a frame. In order to open this as an Applet in netscape, I created a GUI_RMIApplet.java file. And The GUI_RMIApplet.html file opens the GUI_RMIApplet.java file which in return opens GUI.java. The exit call is in GUI.java file.
    The html file code is as follows:
    <EMBED type="application/x-java-applet;version=1.3" CODE = "musr.client.gui.GUI
    _RMIApplet.class" CODEBASE = "." ARCHIVE = "jar/musr.jar" NAME = "MUSR GUI APPLE
    T" WIDTH = 400 HEIGHT = 300 ALIGN = middle VSPACE = 0 HSPACE = 0 UBBoption = "de
    velop" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/pl
    ugin-install.html">
    <NOEMBED>
    The GUI_RMIApplet.java code is:
    package musr.client.gui;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import musr.server.*;
    public class GUI_RMIApplet extends Applet {
    boolean isStandalone = false;
    String message = "The application will launch in a separate window";
    GUI_RMIServer obj = null;
    /**Get a parameter value*/
    public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
    (getParameter(key) != null ? getParameter(key) : def);
    /**Construct the applet*/
    public GUI_RMIApplet() {
    /**Initialize the applet*/
    public void init() {
    try {
    jbInit();
    } catch (Exception e) {
    System.out.println("GUI_RMI exception: " + e.getMessage());
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() {
    // Main bulk for this applet
    GUI gui = new GUI();
    gui.setVisible(true);
    public void paint(Graphics g) {
    g.drawString(message, 25, 50);
    /**Get Applet information*/
    public String getAppletInfo() {
    return "Applet Information";
    /**Get parameter info*/
    public String[][] getParameterInfo() {
    return null;
    //static initializer for setting look & feel
    static {
    try {
    //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    catch(Exception e) {
    And, the GUI.java class calls these funcitons when exit menu button is selected:
    GUI.this.dispose(); // disposes the frame
              System.exit(-1); // disposes the applet (?or not?)
    I think the System.exit button is messing things up but I don't know what other function I can use to close teh applet.
    Hope this is enough information.

  • Applets and Netscape 6!

    Hi there,
    I am not sure if this is the right forum to post my question. However, i saw some discussions reg. Applets on Netscape 6 and i guess that many of you might be familiar with the scenario.
    I'm having trouble getting any applets to work on Netscape 6 when I have HTTP authentication on the webserver enabled. The applet works fine under normal circumstances.
    Instead of loading the applet, I get a Java dialog box saying "Enter Network Password" and asks me to enter my username/password. This is a specific Java dialog box, complete with a picture of Duke, and it
    gives my firewall, digest and realm information.
    However, the dialog box doesn't accept my username/password, and doesn't
    display my applet.
    Here is what i captured on the Java console:
    ======= Default Browser Messages =========
    Java(TM) Plug-in: Version 1.3.0_01
    Using JRE version 1.3.0_01 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\hsivapatham
    Proxy Configuration: Browser Proxy Configuration
    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
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    Registered modality listener
    Referencing classloader: sun.plugin.ClassLoaderInfo@5256fa, refcount=1
    =========== Loading the Applet... ==========
    Added trace listener: sun.plugin.navig.win32.AppletPluginPanel[SpeedDial,0,0,300x295,invalid,layout=java.awt.BorderLayout]
    Sending events to applet. LOAD
    Determine if the applet requests to install any HTML page
    Sending events to applet. INIT
    Sending events to applet. START
    HTML Installation finished.
    ===== Not sure what this means? =========
    Determine if the applet requests to install any JAR
    Jar cache option: null
    Jar archive(s): null
    Jar cache version(s): null
    Applet Installation finished.
    ====================================
    Opening http://10.1.1.126:90/SpeedDialApplet.jar
    Connecting http://10.1.1.126:90/SpeedDialApplet.jar with no proxy
    ======= Puts up a dialog box asking for username and password ==========
    Firewall authentication: site=VAANI/10.1.1.126:90, protocol=http, prompt=xpressa, scheme=basic
    Modality pushed
    Modality popped
    User selected: 0
    Opening http://10.1.1.126:90/SpeedDial.class
    Connecting http://10.1.1.126:90/SpeedDial.class with no proxy
    java.lang.NullPointerException
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(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)
    </code>
    Thanks for your help.
    Priya

    oops, i forgot to add this, can u tell me what speeddial.class is trying to do?
    i belive u r making a url connection in that class and u got a null exception.
    if u r indeed making a urlconnection, be sure to include the basic authentication in the headers. here is a sample
    String basicAuth = Base64Coder.base64Encode("username:password");
    basicAuth = "Basic " + basicAuth;
    java.net.URL url = new java.net.URL(strUrl);
    java.net.HttpURLConnection con = (java.net.HttpURLConnection) url.openConnection();
    con.setRequestProperty("Authorization", basicAuth);

  • Applet in Netscape question.

    Hi, Applet in Netscape question.
    When an applet is run by Explorer everything is OK when trying to run with Netscape (7.1) nothing happening
    What is wrong here ???
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "730" HEIGHT = "260"
    codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-
    windows-i586.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = "Xaaa.class" MAYSCRIPT>
    <PARAM NAME = ARCHIVE VALUE = "Ybbb.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
    <PARAM NAME="scriptable" VALUE="false">
    <PARAM name="progressbar" value="true">
    </OBJECT>
    Thank you in advance !

    Dear Experts.
    Reading through previous Forum similar questions, I changed the code (down below)
    Now I receive the message:
    Click here to get the plugin
    This is encouraging because before Netscape ignored the applet completely ...
    However I already have plugin version 1.4.2_03 installed (and recognized by Explorer)
    The question is still why the applet is not working with Netscape ?
    Thank you in advance for your help?
    <html>
    <body>
    <!-- HTML CONVERTER -->
    <object
    classid =" clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase =" http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"
    width = 730 height = 260 >
    <param name = CODE value ="Xaaa.class" >
    <param name = ARCHIVE value ="Ybbb.jar" >
    <param name =" type" value =" application/x-java-applet;jpi-version=1.4">
    <param name =" scriptable" value =" false">
    <param name="progressbar" value="true">
    <comment> </comment>
    <embed
    type =" application/x-java-applet;version=1.4"
    code =" Xaaa.class"
    archive ="Ybbb.jar"
    width = 730
    height =260
    scriptable = false
    pluginspage =" http://java.sun.com/products/plugin/index.html#download">
    <noembed> alt="Your browser understands the <APPLET>
    tag but isn't running the applet, for some reason."
    Your browser is completely ignoring the <APPLET>
    tag! </noembed> </embed> </object>
    <!--"END_CONVERTED_APPLET"-->
    </html>
    </body>

  • Persistent applets in Netscape 7.x

    When I run my applet in Netscape 4.x,navigating to a different page cause my applet to get a stop() call, then pressing the "Back" button the applet gets a start() and I can resume the work. All the sockets are still open. Using the same applet in Netscape 7.x, I get a destroy() call and all the sockets are shutdown. This makes it impossible for me to resume my session when pressing the "Back" button.
    Is there a way to instruct the browser not to destroy the applet when the page is not visible?

    Is destroy overrideable? If so, just return from it.It's too late. I just get some exceptions and my sockets are closed. I need to avoid calling destroy() at the first place.

  • Java Applets in Netscape with EMBED   tag

    Hi,
    I tried to run the examples on the:
    http://192.9.48.9/products/plugin/1.3/demos/applets.html
    Demo paged off of the plug page and in Netscape 4.08 it
    does not know there is a plugin , in Netscape 6.0
    it knows there is a plug in but won't use the one installed on the machine (1.3.1) which is the same level as the demo.
    Any clues how to get applets to use the Java Plugin with Netscape? This works fine in IE
    Thanks!
    BTW- I'm using NT 4.0 os.

    Probably 1.3.1 conflicts with 1.3.1_01 or 1.3.1_02.
    You need the HTML Converter from the Java PlugIn download page to make your page ready for Netscape 4.x. Go to http://java.sun.com/products/plugin/1.3/converter.html (Java Plug-in HTML Converter Download) to download your copy of the HTML Converter. Watch for the current version, it is 1.3, not 1.1.1.
    Download your page, strip out the <embed/> and <object/> elements, uncomment the <applet/> element and run the HTML Converter.
    Additional Information:
    Netscape 6 does not use the <embed/> element anymore since it isn't a html element but was a proprietary netscape tag. Netscape 6 uses the <object/> element like Internet Explorer and Opera.
    Another note on <embed/>:
    Use of <embed/> is strongly discouraged, but there's no other chance. Let's hope support for Netscape 4.x won't be neccessary any more in a few months.
    A note on <applet/>:
    The <applet/> element is deprecated since HTML 4.01 or earlier (http://www.w3.org/TR/html401/struct/objects.html Objects in HTML 4). One should use the <object> element instead anyway. The semantic description of html elements found in the technical report of the html 4.01 recommendation is still valid for current html versions of today (XHTML 1.1 and XHTML Basic 1.0).
    There's also a funny page of Sun about HTML: http://java.sun.com/products/plugin/1.3/docs/tags.html. Don't take that page too serious since it states it is talking about HTML, but it isn't.
    If you use the HTML Converter, be sure to use the Extended (Standard + All Browsers/Platforms) template to tell Netscape, Opera and Internet Explorer regardless of the used version to display the applet correctly. But watch out: the generated code is not HTML and will perhaps even crash your page in Internet Explorer 6 and browsers that rely on the HTML standard! It also won't work with Netscape 6 if there is a different version of the Java Plugin installed more recently than the requested. I have SDK 1.3, 1.3.1 and 1.4 installed, and Netscape 6 wants to download the 1.3.1 Plugin.
    The best way to make your applet work in really every browser is to study what the converter is trying to do and code it by yourself in a conformant way. Be sure not to tell the browser the Plugin version to use to avoid the neccessarity of downloading outdated plugins and installing several plugins (1.2, 1.2.1, 1.2.2, 1.3, 1.3.1, 1.3.1_01, 1.3.1_02, 1.4...).

  • Applet can not run in browser, but it wroks in appetviewer. Why?

    I wrote a very simple applet, and it works well when I use appletviewer. But when I use browser to open the html file which contains the applet, it always gives no class found error. My browsers are IE5.0 and Netscape4.77. Hwo can I make the applet run in browser?
    Quick response is greatly appreciated.

    see you have to put the proper code base in your html file.check if your browser is java enabled or not.Java plugin comes with IE 5 and it automatically get installed if you won't disagree with that.Check in optin menu of ur browser that java is enabled or not.
    Applet works fine with all browser.
    2nd thing when you r running applet through appletviewer,it runs as an application from your local JVM while running through browser means you are running applet through browser 's JVM.

  • Applet does not run in Browser

    Iam using Windows XP and IE 6.0. Applets do not run in my browser. Hovering the cursor where the applet should be in the browser, I get a Class not found message. Setting the CLASSPATH variable did not help. Any suggestions?

    You might find an answer in this new page
    [url http://java.sun.com/j2se/1.4.2/docs/guide/deployment/deployment-guide/upgrade-guide/index.html]Java Upgrade Guide: Migrating From the Microsoft JVM to the Sun JRE

  • Applet JNLP not accessible in browser ?

    Hello,
    I am new to java and to programiing in general. Thanks in advance for your help. I can't get an Applet to work in any browser (Google, Mozilla, IE) while it works fine in appletviewer. Why?
    The Source:
    import java.awt.*;
    public class Hwa extends java.applet.Applet {
    public void init (){
         add(new Label("Hello World"));
    compiled in Hwa.class, then in a Hwa.jar file,
    The JNLP file:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="" href="">
    <information>
    <title>Hw Applet</title>
    <vendor>CCN</vendor>
    </information>
    <resources>
    <j2se version="1.4+" href="http://java.sun.com/products/autodl/j2se" />
    <jar href="http://www.ccca.eu/Hwa.jar" />
    </resources>
    </jnlp>
    The HwaAPJNLP.html file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html dir="ltr" lang="fr"><head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>CCCAEU</title>
    <meta content="" name="author">
    <style type="text/css"></style>
    <link rel="stylesheet" href="CCCAEU.css" type="text/css">
    </head><body>
    <applet code="Hwa.class" ref_jnlp="Hwa.jnlp" height="50" width="150"></applet>
    </body></html>
    All files are copied on the http://ccca.eu/. of the server
    Executing appletviewer HwaAPJNLP.html (local copy of the html file) works just fine BUT launching http://www.ccca.eu/HwaAPJNLP.html returns a blank rectangle with the JAVA console message "Detected from bootclasspath: C:\\PROGRA~1\\Java\\jre7\\lib\\deploy.jar" and "Incompatible magic value 1008812135 in class file Hwa". WHY ?
    FYI, the ".htaccess" file on my WebServer is
    AddType x-mapp-php5 .php
    AddType application/x-java-jnlp-file JNLP
    Thanks in advance for your support.

    Thank you Baftos. It works but I still do not understand the logic. Before, my Hwa.class was only accessible through my Hwa.jar file on http://www.ccca.eu/Hwa.jar, itself defined as the reference if the jnlp file, see above. My understanding of the jnlp logic is that the html page will load the Hwa.class from the Hwa.jar file. Is that correct ? Thanks to your post, I copied the Hwa.class directly under http://www.ccca.eu/Hwa.class and yes, when accessed through the browser, I can download it. Even better, my previous html page above - unchanged - now WORKS. Thanks for letting me know where I think wrong.

  • The first tab I have never closes and when I open a second one and close that the whole browser will close. Is this a bug?

    Since downloading the 4.0 beta, in both versions (4.0 and 3.6) I can't close the first tab that is opened when I start the browser. I click the red close button and nothing happens but if I open another tab and close that then it will close and the whole browser will close. I have uninstalled the beta version and the 3.6 version and reinstalled the 3.6 version but it hasn't made a difference.

    JUst experienced the exact  same problem after changing password.Getting same message. Hope someone has an answer for this.

  • When I close Firefox another Firefox browser opens. WHY and how do I stop this?

    Every time I close Firefox another Firefox browser opens. Then I close that one and it stays closed. How do I stop it from opening a new Firefox browser on it's own?

    Is it possible that you actually have two Firefox windows open and Windows 7 is showing one Firefox on the System task bar, but if you were wave mouse over that, you might see two windows.
    To Close Firefox use File > Exit (Alt+F > Exit)
    and not the X in the upper right corner which only closes the Window and may or may not close Firefox if it is the last window. The reason it does not always close Firefox is that there may be other tasks running so you don't see Firefox anywhere but in the System Task Manager on the Processes Tab which is where you can see if firefox.exe is running or not. Shortcut to Task Manager on Windows 7 is Ctrl+Shift+Esc (for other Windows systems Ctrl+Alt+Del , select Task Manager,...)

  • WARNING: Serious bug in Netscape 6.01 browser

    All--
    I've just been bitten by a serious bug in the Netscape 6.01 browser, and
    want to let you know about it before it bites you too. Full bug details can
    be found at http://bugzilla.mozilla.org/show_bug.cgi?id=55055
    A short summary is that the back & forward buttons incorrectly resubmit form
    fields. For example, say I have this page flow:
    Page A -> Page B - (submit form) -> Page A -> Page C
    Use Back button to go from C back to A
    On backing up from C to A, Netscape tells me that there are posted form
    elements and asks if I want to resubmit them or cancel the back action.
    Because I'm backing up to A, it tries to resubmit the form fields from page
    B in order to show page A!
    What does this mean? It means that the Web application gets another hit to
    page B, as if the user had pushed a button on it again--even if this isn't
    allowed by the application. In other words, the back button becomes a
    serious threat to an application's consistency. Neither IE nor Opera do
    this, nor did any other version of Netscape.
    Please keep this behavior in mind if you are designing an application that
    could be used with Netscape 6. For those transactions that you need to
    ensure aren't executed more than once, you may want to set a hidden field on
    the page (page B) or otherwise keep track of a value that indicates whether
    the transaction has been executed or not. Another option might be to set an
    HTTP header indicating that the problematic page (page A) can't be cached by
    the browser (this differs from what one might do in the "normal" situation
    of telling the browser not to cache page B, so that backing up from page A
    to B wouldn't be possible).
    Todd

    Double tap with THREE fingers. Then go into Settings>General>Accessibility and turn zoom off.

  • In the 20.0.1 update, I noticed when you accidentally close your window your browsing it automatically closes your downloads. Can I bypass this?

    In the 20.0.1 update, I noticed when you accidentally close your window your browsing it automatically closes your downloads. Previous versions when you close your window and reopen Firefox your downloads are unaffected until your downloads are finished or you cancel it yourself. Is there a setting I can set that my downloads are unaffected when I close my window.

    You can set the browser.download.manager.quitBehavior pref to 2 on the about:config page.<br />
    That will make Firefox ask for confirmation if you want to cancel the download if you close Firefox.
    See:
    * http://kb.mozillazine.org/browser.download.manager.quitBehavior
    *http://kb.mozillazine.org/about:config

Maybe you are looking for