Launching applet

please ignore the previous posting. I have an HTML form that has a textarea. I would like to send the contents in a text area to a signed applet.
In the first HTML form gets the contents of the text area and calls another html form, The second HTML page(cryptojni.html) calls the signed applet. But wheni try to display the text in the signed applet i get a error " java.awt.TextField[textfield0,0,0,0x0,invalid,text=,editable,selection=0-0]" The HTML page is able to pop up the signed applet but there is nothing in the "text" string!!
<html>
<SCRIPT>function toApplet() {
var f = document.forms[0];
var a = document.applets[0];
a.setFieldText(f.inputarea.value);
return false;
</SCRIPT>
<body>
<form name="input" action="cryptoJNI.html" method="post">
<TEXTAREA NAME="inputarea" ROWS="30", COLS="60"></TEXTAREA>
<BR>
<INPUT TYPE=SUBMIT NAME='click' ONCLICK="return toApplet();"></FORM>
</form>
</body>
</html>
CRYPTOJNI.html
<html>
<title> CRYPTO JNI</title>
<h1> Calling the keystore </h1>
<hr>
<APPLET CODE = Testapp.class archive="scryptoJNI.jar" WIDTH=500 HEIGHT=500>
</APPLET>
<hr>
</html>
Testapp.java
public class Testapp extends Applet {
private TextField field;
public void init(){
field=new TextField(100);
add(field);
System.out.println(field);
public void setFieldText(String text) {
field.setText(text);

Hi,
If I am not mistaken you need to do getContentPane().add(...) only when you are using Swing applet.
Well, here what I see as the potential problem is, the fact that when you are submitting the first HTML and calling the next one, nowhere you are collecting the value of Textarea and setting it into the applet of next HTML page. And even you cant do that with plain HTML.
If you want your application to share data among requests you need to use some technology like CGI, JSP, ASP, PHP etc.......
Bakul.

Similar Messages

  • Java 7: Problems launching applets with jars on "file://" location

    Hi,
    We are experiencing a problem when updating our client's JRE from Java6 U 21 up to Java7 U 55.
    We have developed an Applet which is composed by several JAR files. Some of those JARs must be stored in local drive, and the JAR with the main Java class is stored on server.
    Let's supose we have a similar scenario like this:
    https://blahblahbah/bar.jar
    https://blahblahbah/test.html
    C:/foo.jar
    The code of test.html:
    <embed
      archive="file:///C:/foo.jar"
      cache_archive="bar.jar"
    />
    This code works fine on Java 6 and Applet is correctly loaded.
    However, with Java 7 a security exception is raised when trying to load JAR files from "file:///" location during Applet launch:
    java.lang.SecurityException: Permission denied: file:/C:/foo.jar
        at sun.plugin2.applet.Applet2Manager._loadJarFiles(Unknown Source)
    We have tried several tests using a java.policy file which grants all possible permisions:
    grant codeBase "file:/C:/foo.jar" {
        permission java.security.AllPermission;
    grant {
      permission java.security.AllPermission;
    We also tried to low Java's security level to "MEDIUM", with no success.
    We finally only managed to run the Applet if we explicity disable the "Next-Generation Plugin" with Internet Explorer 8. However, that's not a suitable solution, and still does not work with Mozilla family browsers.
    Eventhought with Mozilla browsers is still not working.
    Is there any restrictions in Java 7 that prevents to read jars from being loaded from local drive when launching Applets?
    Thanks in advance,

    Thank you baftos.
    I had read the whole message before posting mine. It's not the same problem. I'm able to run the sample signed applet always having the jar in the same location than the HTML page serving the applet via JNLP:
    <jar href="SignedAppletTest.jar" main="true"/>
    However, the security exception raises when trying to read that jar from local drive:
    <jar href="file://C:/SignedAppletTest.jar" main="true"/>
    ExitException[ 3]java.lang.SecurityException: Permission denied: file://C:/SignedAppletTest.jar
        at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    I have even tried to decompile JNLP2Manager class, without seeing anything useful on that loadJarFiles method
    The only way I managed to avoid the problem is unchecking the New Generation Plugin and running the Applet with IE. Not a suitable solution for me at all..

  • Using a DLL or .so in a JNLP-launched applet

    I have a 3rd-party JAR which includes code that requires a DLL (or .so on Linux) to work and I need to use it in a JNLP-launched applet. What's required with Java 6 Update 16?
    1. I believe I need to get the DLL inside its own JAR and mark it as a native library in the JNLP. Is that just a matter of using the jar command to put it in the JAR?
    2. Must the applet then be signed?
    3. If yes to (2), will the end user still get some kind of security warning before running the applet?
    4. If yes to (3), will the warning only appear the first time the applet is run and not again after the JAR is cached?
    5. Do I need to manually "load" the DLL inside the applet's code? If not, how else does it know where to find the DLL (like -Djava.library.path in an application)?
    Thanks,
    The Gibbon

    I have a 3rd-party JAR which includes code that requires a DLL (or .so on Linux) to work and I need to use it in a JNLP-launched applet. What's required with Java 6 Update 16?Nothing different than other JRE's, what's the question?That was an introduction to my set of 5 specific questions.
    1. I believe I need to get the DLL inside its own JAR and mark it as a native library in the JNLP. Is that just a matter of using the jar command to put it in the JAR?Yes it is.Good.
    2. Must the applet then be signed?No, AFAIKWell see hear's the problem. The Google research I did before I asked the questions was confusing as some people said it needed to be signed and others didn't. My own tests have encountered security exceptions and I was trying to know if they were because the applet wasn't signed. The whole purpose of me starting this thread was to save me a lot of time messing around with these kind of problems not knowing if it's even supposed to work or not.
    See? It's all so amazing easy that making a simple test would have taken less time than this whole thread.
    This is why we talked about spoonfeeding.I don't see that it's amazingly easy when you disagree with the majority of the posts and information I read which were in themselves contradictory. It's obviously not a clear cut subject and everyone has a different opinion. I was hoping someone who had tried what I am wanting to do could just tell me definitively if it was ever going to work.
    What's even more amazing is that you didn't add any duke!I have to say I don't know anything about adding dukes, that's why I didn't do it.
    Real thrill is you're probably gonna meet some real problem depending on your actual needs! LOL!
    BTW: most of us has good knowledge of JWS but isn't such an applet expert (which, maybe, you are), so, in your case expecially, coming here with a realWorldJavaWebStartFailure would have been for sure the best approach, that's all you should really understand, IMVOHO.I realise that JWS is not often used to launch true applets but still I hope someone here would have done it and been able to share their experience.

  • Launching applet in html

    Hallo,
    I'm launching my applet vie jnlp-file. But I need to create code to dynamically generate page launching applet with parameters. My jnlp-file:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp codebase="http://192.168.20.71/MyApplet" href="launch.jnlp" spec="1.0+">
    <information>
    <title>MyApplet</title>
    <vendor>rafal</vendor>
    <homepage href=""/>
    <description>MyApplet</description>
    <description kind="short">MyApplet</description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se java-vm-args="-Djava.security.policy=applet.policy -Xms32m -Xmx500m" version="1.6+"/>
    <jar eager="true" href="MyApplet.jar" main="true"/>
    <jar href="lib/jai_codec.jar"/>
    <jar href="lib/jai_core.jar"/>
    <jar href="lib/mlibwrapper_jai.jar"/>
    </resources>
    <applet-desc height="768" main-class="MyAppletMain" name="MyApplet" width="1024">
    <param name="DbUrl" value="http://192.168.20.71/MyApplet"/>
    <param name="PictureURL" value="http://192.168.20.71/MyApplet/GetPicture"/>
    <param name="Modalities" value="CT,MR,CR,SR,US,NM,XR,DX,XA,IO,DR,RF"/>
    </applet-desc>
    </jnlp>
    I have an example that launches an applet with following script:
    <script src="http://java.com/js/deployJava.js"></script>
    <script>
    var attributes = {
    codebase: [applet codebase],
    code: [class to launch],
    archive: [JAR file with the applet],
    width: [applet width],
    height: [applet height]
    var parameters = { [applet parameters] };
    var version = [JDK version];
    deployJava.runApplet(attributes, parameters, version);
    </script>
    How should I fill the attributes to be able to launch my applet? The format of parameters-attribute is for me unknown, how to pass more then one parameter?
    The applet uses addidional jar-files, how to include these into this script? Is there another way to start applet?
    with regards
    Rafal Ziolkowski

    rafzio1 wrote:
    ..What's wrong?1) First of all, put all this crap with JNLP files, the deployJava.js and JSPs aside for a while. (a)
    2) Develop a plain old HTML file for the applet.
    3) Configure the Java Control Panel to pop open the Java Console when it encounters an applet.
    4) Ensure your code does not [swallow exceptions|http://pscode.org/javafaq.html#stacktrace] *(<- link)* at any point.
    5) Try and load it in the HTML and [copy/paste the Java Console output|http://pscode.org/javafaq.html#exact] *(<- link).*
    6) If you can make that HTML available for us to see, post the URL. If not, at least copy/paste the HTML, and please include it in code tags so it is easy to read.
    a) OK - none of those are crap, but they are extra complications above and beyond what you need for some basic testing.

  • Launch applet from html from ff/ie/chrome but breaks chrome when xhtml

    The following will work as an html file. However I place the body into a jsf xhtml file. Chrome complains: "TypeError: Object#<Document> has no method 'write' " The deployJava.js doesn't work in pc based safari in any case - but direct <applet> works for html file. Any idea how to resolve?
    Monty
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <script src="http://www.java.com/js/deployJava.js"></script>
    <script type="text/javascript">
    try {
    // launch applet
    var attributes = { code:'aa.fx.applet.NewJApplet',  width:640, height:480} ;
    var parameters = {jnlp_href: 'newJnlpTemplate.jnlp'} ;
    deployJava.runApplet(attributes, parameters, '1.6');
    } catch(x) {
    alert(x);
    //]]>
    Edited by: 845430 on Mar 17, 2011 8:13 PM

    I'm guessing you'll get better answers on a Chrome forum, since Chrome seems to be the culprit.

  • Is there a way to remove "Applet running..." when launching Applet in JWS?

    Is there any way to remove the "Applet running..." message at the bottom of the applet when launch in JWS? I have searched in the forum and bug database and cannot find a reference in how to remove it.
    I remember in the old applet days (JDK 1.1, 1.2?), everybody are mad at the yellow warning message when launching a new frame from an applet window. It is hard to believe this issue reappears in JDK 1.4.
    FYI, all the jar files are signed. And I am using JDK 1.4.1.
    Thanks,
    Nelson Fong

    Dietz,
    Thanks for your response. Unfortunately, our application requested all-permission in the jnlp file, and all jar files are signed as well.
    In fact, the warning is more like a status bar. The message was changed from "Initializing Applet..." to "Applet running...." during init() method.
    Any help would be appreciated. Thanks

  • Authenticate twice when launching applet from IIS

    Help! Once a user is successfully logged in using basic authentication on IIS, he still gets prompted for a username/password from the sun JVM after the applet is launched. Is there any way around this other than:
    1) Using the MSJVM
    2) Making that directory that launches the applet Anonymous.
    Thanks
    Zamil

    If IIS got Basic or Intergrated Authentication on than updating would fix this.
    The jre will use the browsers settings to connect. I had this problem trying to see applets on the Internet
    through a proxy that required NTLM. 1.4.0 could not authenticate at all and 1.4.2 kept asking for my domain
    ID. Since this is a bad habbit for users to fill out their ID and password when opening Inernet pages we
    waited for a newer release and that fixed it.

  • ClassCastException launching Applet under JRE 7u21

    I'm working on a signed Applet that will no longer start under version 7u21 of the JRE, and I've been able to isolate the problem to the Java Plugin's cache. If I disable Temporary files in the Java Control Panel, then everything's file. If I enable Temporary files, I get this exception in the Java console on startup:
    basic: exception: com.sun.deploy.net.DownloadEngine$2 cannot be cast to com.sun.deploy.cache.CacheEntry.
    ExitException[ 3]java.lang.ClassCastException: com.sun.deploy.net.DownloadEngine$2 cannot be cast to com.sun.deploy.cache.CacheEntry
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    The applet is being deployed using Oracle's deployJava script.
    This is happening on all our test systems in Chrome, FireFox, IE 8 and 9, which reinforces that this is a plugin problem. It's currently impacting a production system that's been running just fine for over a year before this JRE update.
    Any insight anyone has would be greatly appreciated.

    Seems like you did proper research there, I would report your findings as a bug if there isn't already one similar to yours.

  • Launching same applet in new browser window

    Hi,
    I launched applet in netscape browser and it worked fine. Then I opened a new window and pointed same url as first browser, applet main window is launched but because of shared static variables the two applets conflict each other.
    we understood that applet from same code base loads in to same name space so the static information is shared between different applet instances.
    one solution might be creating our own ClassLoader- browsers SecurityManager dont allow outside application to create ClassLoader unless user sets security policy to allow.(I cant ask user to do that and I cant afford signed applet solution)
    basically I am looking for a solution like
    1. launching new instance of netscape which dont share its JVM with other netscape windows(I dont know how to make it)
    2. triggering netscape to use different class loaders(its own classloader) every time.(How??)
    3. heard mayscript html flag helps(I have no idea)
    4. any better solution
    Your help is very importent so any suggestion or solution is welcome
    thanks in advance
    rana pratap nama

    the most simple idea is to avoid the usage of static variable when the values of theese variables will be private to each applet instance...
    much more simple than create a new class loader...
    remember: a static variable should be used only when you want the same value shared by all instances of a class... otherwise use the private ones...

  • Jgol error with JNLP Applet Launcher

    I've been able to deploy my applet with the JNLP launcher and jogl, but whenever I try to use an animator in my program applet crashes with this error. Am I forgetting to add something in the code? Any help is appreciated.
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/jogamp/opengl/util/Animator
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: com/jogamp/opengl/util/Animator
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
    and other stuff.
    My html code is
    <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
    width=600
    height=400
    archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
    http://download.java.net/media/jogl/jsr-231-2.x-webstart/nativewindow.all.jar,
    http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl.all.jar,
    http://download.java.net/media/gluegen/webstart-2.x/gluegen-rt.jar,
    https://sites.google.com/site/popesdev/ElementLearner.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="ElementLearner">
    <param name="subapplet.displayname" value="ElementLearner">
    <param name="noddraw.check" value="true">
    <param name="progressbar" value="true">
    <param name="jnlpNumExtensions" value="1">
    <param name="jnlpExtension1"
    value="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-core.jnlp">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="jnlp_href" value="https://sites.google.com/site/popesdev/ElementLearner.jnlp">
    </applet>
    My jnlp file is
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp href="ElementLearner.jnlp">
    <information>
    <title>ElementLearner</title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <homepage href=""/>
    <description>ElementLearner</description>
    <description kind="short">Brian Paul's Gears demo ported to Java and JOGL.</description>
    <offline-allowed/>
    </information>
    <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    <property name="sun.java2d.noddraw" value="true"/>
    <jar href="https://sites.google.com/site/popesdev/ElementLearner.jar" main="true"/>
    <extension name="jogl-all-awt" href="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-all-awt.jnlp" />
    </resources>
    <applet-desc
    name="ElementLearner"
    main-class="ElementLearner"
    width="600"
    height="600">
    </applet-desc>
    </jnlp>

    p0pes wrote:
    running JaNeLA gives me this error.
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'extension'. One of '{property, package}' is expected.
    The help here http://pscode.org/janela/help.html really didn't help too much.
    The help for that error states:
    This one fools a lot of people. It most often means that elements are out of the correct order in the launch file. Check the spelling, then try shifting the element further up the document. Did you check the file against the documentation for creating JNLP files? Did you try reordering the elements? Did you check the spelling of the element name?
    Note that those type of errors are produced by the J2SE based XML APIs when validating an XML document against an XSD. That means that there should be thousands of hits across the internet that discuss that error.
    Any other ideas?Some:
    - Do not expect the people here to spoon feed answers to you.
    - Describe what actual methods you used to try and resolve the error, rather than just state the tools are 'not that helpful'.
    - Mention whether the JNLP can be launched as a free floating app., like I suggested you try. After all, we are not psychic.
    It might be obvious that I am a little irritated by your reply. JaNeLA was primarily written by me, though it has significant contributions from another developer. It was written for the purpose of helping people to validate JNLP files and resources, but the user must be able to think for themselves & do some research, in order to get good use from it.
    When I initially saw the thread to do with a problem in regard to the JNLP applet launcher, I was about to pass it by completely. These forums are not for providing support for 3rd party APIs. But since the JNLP was obviously wrong I decided to give you some help on that, in the hope that would solve the problems.
    If it doesn't solve the problem, or if you continue with this 'helpless lamb' attitude, I will be opting out of the thread.

  • White spaces issue when applet is launched from Browser

    I am trying to open HTML file (generated by net beans) to launch applet using window.open function.
    The applet is launching fine but white spaces are coming on top and left side of the applet.
    Any idea on how to remove these white spaces?

    You need a custom html template and to set the application size parameters to 100% width and height.
    Not sure if this is possible using the NetBeans JavaFX project configuration options currently.
    Have a look at the Ensemble sample and Ensemble sample code, it implements a custom html template and 100% size parameters.
    http://www.oracle.com/technetwork/java/javafx/samples/index.html
    A css reset will remove default padding from an html page.
    http://yuilibrary.com/yui/docs/cssreset/
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.6.0/build/cssreset/cssreset-min.css">
    The minimal reset required to remove margins around the edge of the page is:
    html, body { 
        margin: 0; 
        overflow: hidden; 
        padding: 0;
    }Documentation is on web based deployment templates and application size is:
    http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm#BABJHEJA
    Note it doesn't talk about percentage sizes as this may be an undocumented feature, but I think if you set the width and height in the dtjava.App call to '100%', the app will fill the available area of a window.
    A view source on the ensemble html =>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JavaFX 2.0 - Ensemble</title>
    <SCRIPT src="./web-files/dtjava.js"></SCRIPT>
    <script>
        function javafxEmbed_ensemble() {
            dtjava.embed(
                    id : 'ensemble',
                    url : 'Ensemble.jnlp',
                    placeholder : 'javafx-app-placeholder',
                    width : '100%',
                    height : '100%',
                    jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iRW5zZW1ibGUuam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+RW5zZW1ibGU8L3RpdGxlPg0KICAgIDx2ZW5kb3I+ZGVtbzwvdmVuZG9yPg0KICAgIDxkZXNjcmlwdGlvbj5TYW1wbGUgSmF2YUZYIDIuMCBhcHBsaWNhdGlvbi48L2Rlc2NyaXB0aW9uPg0KICAgIDxvZmZsaW5lLWFsbG93ZWQvPg0KICA8L2luZm9ybWF0aW9uPg0KICA8cmVzb3VyY2VzPg0KICAgIDxqZng6amF2YWZ4LXJ1bnRpbWUgdmVyc2lvbj0iMi4yKyIgaHJlZj0iaHR0cDovL2phdmFkbC5zdW4uY29tL3dlYmFwcHMvZG93bmxvYWQvR2V0RmlsZS9qYXZhZngtbGF0ZXN0L3dpbmRvd3MtaTU4Ni9qYXZhZngyLmpubHAiLz4NCiAgPC9yZXNvdXJjZXM+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iRW5zZW1ibGUuamFyIiBzaXplPSI4ODQ4MTU0IiBkb3dubG9hZD0iZWFnZXIiIC8+DQogIDwvcmVzb3VyY2VzPg0KICA8YXBwbGV0LWRlc2MgIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBtYWluLWNsYXNzPSJjb20uamF2YWZ4Lm1haW4uTm9KYXZhRlhGYWxsYmFjayIgIG5hbWU9IkVuc2VtYmxlIiA+DQogICAgPHBhcmFtIG5hbWU9InJlcXVpcmVkRlhWZXJzaW9uIiB2YWx1ZT0iMi4yKyIvPg0KICA8L2FwcGxldC1kZXNjPg0KICA8amZ4OmphdmFmeC1kZXNjICB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgbWFpbi1jbGFzcz0iZW5zZW1ibGUuRW5zZW1ibGUyIiAgbmFtZT0iRW5zZW1ibGUiIC8+DQogIDx1cGRhdGUgY2hlY2s9ImJhY2tncm91bmQiLz4NCjwvam5scD4NCg=='
                    javafx : '2.2+'
        <!-- Embed FX application into web page once page is loaded -->
        dtjava.addOnloadCallback(javafxEmbed_ensemble);
    </script>
            <style>
                html, body { 
                    margin: 0; 
                    overflow: hidden; 
                    padding: 0;
            </style>
            <script>
                function hashchanged(event) {
                    var applet = document.getElementById('ensemble');
                    if (applet != null) {
                        try {
                            applet.hashChanged(location.hash);
                        } catch (err) {
                            console.log("JS Exception when trying to pass hash to Ensmeble Applet: " + err);
            </script>
    </head>
    <body onhashchange="hashchanged(event)"><div id='javafx-app-placeholder'></div></body>
    </html>

  • Problem with running Applets in JDEV 10G Preview

    Our Jdeveloper project has a default run target which is an Applet HTML page.
    Sometimes when a you click Run/Debug the project runs in Applet Viewer and sometimes it spawns an OC4J process and runs it in the container. It seems the execution of our project has a mind of its own. You can run/debug the same project on different developer PCs and have different execution behavior.
    How do you configure the execution environment for applets?
    If possible, it would be nice to be able to create multiple execution profiles so that we could have this applet run in OC4J sometimes and in AppletViewer other times. But it does not seem like you have control of this under the project properties.
    Thanks,
    Paul Manning

    Hi Paul,
    In the 10g preview, the code that launches applet viewer has first crack at whether it should "run" your html file. If that code thinks it should not launch applet viewer, then the code that launches OC4J gets a chance. The applet viewer launcher looks at the contents of the html file and looks for the <applet> tag. Is it possible that the contents of your html file is changing in such a way that my applet viewer launcher code isn't able to find the <applet> tag? If so, can you possibly send me your html file, or describe the applet tag(s), so that I can improve my side? I'd really appreciate it.
    In the near term future (the 10g release), when the run target can be started in different ways (like your applet html), the user will get to choose which way when he/she clicks run/debug. If you use the context menu, the run and debug items will lead to a pull-right submenu that lists all the choices. However, if my applet viewer launcher code doesn't find the applet tag in your html file, you won't see applet viewer in the list of choices.
    In the long term future we will support real multiple execution profiles.
    -Liz Looney

  • Problem in Closing Browser window from an Applet.

    I have wriiten a small Applet progarm that calls a Javascript function in the opening window, to close the window in which it is loaded.The Applet window is a PopUp window from one of my application's window.
    First time I start my application and load that Applet and then close the frame window,it works fine that the browser window will close, when the frame window is closed.It calls the window closing event in that applet stop method is called and In stop methd a closeLaunchedBrowser method will called this has a Javascript method and the Method closes the window using the self.close() method.
    But now if I continue this process of launching applet and then closing frame window, initial 1 or 2 steps it has know problem when I continue this, after 3 or 4 steps, it result in browser hang/crash.
    I am using java version 1.4.2_01 or higher and IE or Firefox(any other NetScape based) browser to load applet.It works fine with IE but getting problem in case of Firefox(any other NetScape based).
    The error dialog information and related event log generated is shown below :
    The dialog which is displayed before crashing of firefox has information :
    "firefox.exe has generated errors and it will closed by windows.you will need to restart the program.
    An error log is being created."
    The error log information :
    Source : Browser Event ID: 8032
    "The browser service has failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{611A64A2-8F4B-409E-9AB2-0D9BF741E791}. The backup browser is stopping.
    The code related to this is given below.
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class TestApplet extends JApplet {
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    TestApplet.this.stop();
    frame.show();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    closeLaunchedBrowser();
    System.gc();
    System.runFinalization();
    private void closeLaunchedBrowser() {
    final TestApplet thisObject = this;
    Runnable r = new Runnable() {
    public void run() {
    try {
    JSObject win = (JSObject)JSObject.getWindow(thisObject);
    if (win != null && win.toString() != null) {
    //win.eval("top.opener=self;self.close();");
    //win.call("close", null);
    win.eval("self.close();");
    } catch (Exception e) {
    Thread t = new Thread(r);
    t.start();
    }If any one know solution regarding how to aviod this crash of browser please let me know. I will be very thankful to you.
    Thanks.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • Applet works on eclipse but not on reg browser (not inited error)

    Hi everybody,
    I've just made an applet, but I don't know why it can't be shown. I'm working with Eclipse, and when I run the .java file, everything works fine. It even works fine when I specify parameters through the eclipse build file parameter arguments.
    Now I would like this to work by using the appletviewer and my html file. When I do this, the application doesn't work anymore and I get this error: Start applet not inited and shows loading java Applet failed when I scroll over to the java applet box on the browser. (Mozilla)
    I used this code in the html file:
    <html>
    <head>
    <title>MicroToolBus Example Plugin Applet 2 </title>
    </head>
    <body>
    <h1>MicroToolBus Example Plugin Applet 2 </h1>
    <hr>
    <applet code =MicroToolBus.class width=400 height=100>
    <param name="ModelName" value="edu.vt.vbi.pathport.client.plugin.microarray.MicroarrayModel">
         <param name="DataLocation" value="c:/eclipse/workspace/PathPort/xml/samples/mageml/pmml.xml">
    </applet>
    </hr>
    </body>
    </html>
    which is located at
    C:\eclipse\workspace\PathPort\build\edu\vt\vbi\pathport\client\toolbus\MicroToolBus.html
    The MicroToolBus.class file is located in the same directory. What am I doing wrong. I tried putting the class file and the html in the same directory as the actual .java file of the applet, but that didn't seem to work either. Thanks in advance; your help and suggestions are much appreciated,

    What am I doing wrong?Your getting caught in the Sun/Microsoft war. Numerous casualties. For rehab, see:
    http://www.MartinRinehart.com
    Click "Articles", "Launching Applets".
    Warning: make a big mug of java before you start. This is not trivial stuff.

  • Java applet and Linux RedHat7.1 kernel  2.4.2-2

    Hello.
    I have really interesting problem...
    I am trying to run java applet in different env.:
    #1. windows2000, sun java1.3.1, webstart 1.0.1;
    #2. linux RedHat 7.1 kernel 2.4.2-2, sun java1.3.1, webstart 1.0.1;
    #3. linux RedHat 7.0, kernel 2.2.16-22, sun java1.3.0-01, webstart 1.0.1;
    #4.SunOs5.8, sun java1.3.0, webstart 1.0.1.
    I found that webstart can't launch applet into a full size under #2.
    Applet runnable, no error msg in java console, but the applet frame
    size is decrease into min. At the same time this application perfectly
    runnable without any changes under the other env.(#1, #3, #4).
    JNLP file:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for FpEdit.jar Application -->
    <jnlp
    spec="1.0+"
    codebase="http://www.mycodebase"
    href="FpEdit.jnlp">
    <information>
    <title>Ufp Editor Application</title>
    <vendor>ME</vendor>
    <homepage href="http://www.myhomepage"/>
    <description>Ufp Editor Application</description>
    <description kind="short">
    Swing Graphical User Interface.
    </description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.3+" initial-heap-size="30m" max-heap-size="50m"/>
    <jar href="http://www.myhref/SFpEdit.jar"/>
    </resources>
    <applet-desc
    documentBase="http://www.mydocumentbase"
    name="FpEdit"
    main-class="FpEdit"
    width="950"
    height="590">
    </applet-desc>
    </jnlp>
    May be somebody can explain me what is the problem???
    Thank's.

    Sorry about replay, but may be somebody can help me...
    For me ==> this is a problem between new
    linux kernel 2.4.. and java...

Maybe you are looking for

  • How can I periodicaly get data from a CAN interface that works in "Transmit by response" mode??

    Hello Again! I am a very new user of LabView, and last week I got the order to implement a Comunication with  a CAN interface. I am trying to get Information from a CAN interface, that works as a "slave", as it is said in the very short handbook. Thi

  • Client Cache requires ridiculous amount of disk space

    I'm testing SCCM 2012 R2 with a Windows 7 client. I'm on my second application install and both apps gave me error that the cache was not large enough. The first time I increased it to 9GB and for the second app I increased it to 15GB. Both times I d

  • How to create sub views in Oracle SQL

    I am trying to write a select statement through TOAD that needs to build a view and then query from that view further in the same statement. I don't mean create a VIEW in the common sense of running a CREATE VIEW command, I mean creating one dynamica

  • Seimens HMI Integration with SAP MII

    Dear MII Experts, We are trying to integrate shop floor systems with SAP MII for discrete manufacturing industry. I came across the client has 70+ machines in the plant .the vendor is "DMG" Seimens HMI is installed on each machine . What are the poss

  • SET_CODEPAGE_FAILED

    We are instlling ECC 5.0 and when trying to configure STMS it says SET_CODEPAGE_FAILED in Function TMS_PM_DISTRIBUTE_PROFILE for command TMS_PM_DISTRIBUTE_PROFILE. saravan