Calling a java applet

Hi all
I have made a java applet, which gets some client machine
information. I have to call that applet from my form. Is there
any way to do so. Also is there any way that my applet which
gets the installed printer on client machine, can pass the name
of the printer to the calling form ???

To call an applet you can use web.show_document builtin to call
an html page that activates the applet.
To pass parameters to form you can have your applet write the
info to the database or the server's file system and then have
form read it from there.
You might also be interested in the ability to have a Javabean
inside a form that can communicate with the form directly.

Similar Messages

  • Calling a Java Applet - Javascript

    Hey guys,
    I'm still fairly new to Java. I'm having a hard time getting my Applet to run properly.
    Basically, this is what I want it to do:
    I have a web page with a series of fields on it (a form). I have a submit button. When the user clicks the submit button, it activates a Javascript function in a seperate file that validates ALL of these fields. The validation that it does is merely to determine whether or not the fields are blank.
    Once it's accomplished this task, I THEN want it to run a Java applet.
    Everything works up until the point at which it runs the Java applet. I'm not sure how exactly I'm supposed to call the applet from Javascript.
    In every example of a web page that I see that has an applet, it has something that looks like this:
    <APPLET CODE="classname.class >
    </APPLET>That's all fine and good, but the problem is that it automatically calls the Applet then. I don't want it to do that. Is there a way that I can CALL the applet at the very end of a JS file? I mean, I don't want anything to load, no grey boxes or any of that stuff until I actually call it..
    Any idea?
    Thanks!
    Todd

    dude,
    have you managed to call an applet method from firefox?
    I'm not sure it is working at all.
    I've read few articles and everyone is complaining about the same error:
    Error: document.appl01 has no properties
    in the case above the applet was called "appl01"
    I've tried using
    document.applets[0].<the applet method>
    and I've got the same result..

  • IE6 leaks "Handles" when calling *ANY* Java applet

    Hello all IE experts,
    It seems that IE has "Handles" leak when it calls Java Applet.
    Every call to a Java method from JavaScript, IE allocate a handle and does
    not free it.
    THIS DOES NOT HAPPEN when I use mozilla or Netscape.
    Versions:
    * Windows 2000 SP 3 (The most recent, with all fixes of hfnetchk)
    * Internet Explorer (The most recent one, with all fixes of hfnetchk)
    Version 6.0.2800.1106
    SP1
    Q328970
    Q324929
    Q810847
    Q813951
    * Java Plug-in - 1.4.1_02-b06
    If you compile the applet and use the test html, then press "Test" you will
    notice that 1000 (or more) handles are allocated (At Windows Task Manager).
    If you press again you will see that another 1000 (or more) handles are
    allocated. The handles are NEVER released, even if you browse to other
    sites. You can enjoy this process until there are no more handles to
    allocate... :)
    Notice that the applet I use does nothing... I've checked this with various
    of applets on the web and the results are the same.
    Can anyone help?
    Best Regards,
    Alon Bar-Lev
    ** The following html is used: (test1.htm)
    <html>
    <head>
    <script LANGUAGE="JavaScript">
    function OnTest () {
    for (var i=0;i<1000;i++) { a1.method1 (); }
    </script>
    </head>
    <body>
    <input type=button onclick="OnTest ()" value="Test"></input>
    <APPLET code="test1.applet1.class" archive="test1.jar" id="a1" name="a1">No
    Java</APPLET>
    </body>
    </html>
    ** The following applet: (test1/applet1.java)
    package test1;
    import java.applet.*;
    public class applet1 extends Applet {
    public void method1 () {}
    ** The following makefile: (Makefile)
    JAVAC="$(J2SE)\bin\javac" -classpath $(CLASSPATH)
    JAR="$(J2SE)\bin\jar" -cvf
    CLASSPATH=.
    all:
    $(JAVAC) test1/*.java
    $(JAR) test1.jar test1/*.class

    New information:
    This happens from Java version 1.4.0_01.
    This did not happen in Java version 1.4.0.
    Alon.

  • JavaScript call to Java applet

    Sorry if this message get posted twice, but I haven't seen the 1st. I sent.
    I seem to have a problem with a form trying to call an applet. I hava a button like this:
    <input type=button value="Add" onClick="Nota.addRow('2','3','12.80','Cacahuates Mafer 1/2 kg.')">
    my Nota.addRow method is thisone:
    public void addRow (String idS, String qtyS, String priceS, String desc) {
    int id= Integer.parseInt (idS);
    int qty= Integer.parseInt (qtyS);
    float price= Float.parseFloat (priceS);
    remove (total);
    renglones[renglonCnt]= new Renglon (id,qty,price,desc);
    add (renglones[renglonCnt]);//<- This line is not adding the Row when i call it from JavaScript. Otherwise it works just fine...
    //total= Renglon.Total();
    //add (total);
    System.out.println("El id es: " + Integer.toString(id));
    System.out.println("La cantidad es: " + Integer.toString(qty));
    System.out.println("El precio es: " + Float.toString(price));
    System.out.println("La descripcion es: " + desc.toString());
    System.out.println("El precio del objeto es: " + Float.toString(renglones[renglonCnt].getTotal()));
    renglonCnt++;
    Altough my addRow works when I callit from a Nota object it doesn't when i call it from javascript.
    total is just a panel that you get from class Renglon.
    And Renglon is a Panel class too.
    I'll appreciate any help, thanks.
    Jeronimo

    Hey, that's really good news, does it actually adds the row to the applet and gets the new total?!
    Anyway, i tried 1.) (wich describes the applet quite well) and 2.) but still doesn't works for me. Also changed the "price" line...
    Im using:
    Navigator 4.72
    IE 5.50
    Netscape 6
    Here's the html code (the form):
    <form>
    <table border=5 WIDTH=500 align=center>
    <tr>
    <TD width=30%>
    <table border=1 width="100%" >
    <tr>
    <th WIDTH="20%"> Cantidad </th>
    <th WIDTH="26%"> Descripci&oacute;n </th>
    <th WIDTH="20%">Precio Unitario</th>
    <th WIDTH="20%"> Agregar </th>
    </tr>
    <tr>
    <td WIDTH="20%" align=center>
         <input size=2 name=cantidad maxlength=2>
         </td>
    <td WIDTH="26%">
         Cerveza Sol 600ml.
         </td>
    <td WIDTH="20%">
         $15.50
         </td>
    <td WIDTH="20%" align=center>
         <input type=button value="Add" onClick="document.Nota.addRow('1','12','15.50','Cerveza-Sol-600ml.')">
         </td>
    </tr>
    <tr>
    <td WIDTH="20%" align=center><input size=2 maxlength=2></td>
    <td WIDTH="26%">
         Cacahuates Mafer 1/2 kg.
         </td>
    <td WIDTH="20%">
         $12.80
         </td>
    <td WIDTH="20%" align=center>
         <!--<input type=button value="Add" onClick="Nota.addRow('2','3','12.80','Cacahuates Mafer 1/2 kg.')">
         -->
         <input type=button value="Test" onClick="alert (Nota)"
         </td>
    </tr>
    <tr>
    <td WIDTH="20%" align=center><input size=2 maxlength=2></td>
    <td WIDTH="26%"> </td>
    <td WIDTH="20%"> </td>
    <td WIDTH="20%" align=center>
         <input type=button value="Add">
         </td>
    </tr>
    <tr>
    <td WIDTH="20%" align=center><input size=2 maxlength=2></td>
    <td WIDTH="26%"> </td>
    <td WIDTH="20%"> </td>
    <td WIDTH="20%" align=center><input type=button value="Add"></td>
    </tr>
    </table>
    </td>
    <td width="40%">
    <applet name=Nota code=Nota.class width=350 height=250> </applet>
    </td>
    </tr>
    <tr>
    <td colspan=2 align=center>
    <input type=button value="Enviar Pedido">
    </td>
    </tr>
    </table>
    </form>
    Here's the Nota applet code:
    import java.awt.*;
    import java.applet.*;
    public class Nota extends Applet {
    private Renglon renglones[];
    private BarraTitulo titulo;
    private int renglonCnt;
    private Panel total;
    public void init () {
    setLayout (new GridLayout(12,1));
    renglonCnt=0;
    renglones= new Renglon [10];
    total= Renglon.Total();
    public void start () {
    String titulos[]= new String [4];
    titulos[0]="(-) Cantidad (+)";
    titulos[1]="Descripcion";
    titulos[2]="Precio Unitario";
    titulos[3]="Total";
    titulo= new BarraTitulo (titulos,12);
    add (titulo);
    add (total);
    public void addRow (String idS, String qtyS, String priceS, String desc) {
    int id= Integer.parseInt (idS);
    int qty= Integer.parseInt (qtyS);
    //float price= Float.parseFloat (priceS);
    float price= Float.valueOf (priceS).floatValue();
    remove (total);
    renglones[renglonCnt]= new Renglon (id,qty,price,desc);
    add (renglones[renglonCnt]);
    //total= Renglon.Total();
    //add (total);
    //THESE LINES SHOW EVERTHING WELL IN THE JAVA CONSOLE, BUT THESE ARE JUST FOR DEBUG. System.out.println("El id es: " + Integer.toString(id));
    System.out.println("La cantidad es: " + Integer.toString(qty));
    System.out.println("El precio es: " + Float.toString(price));
    System.out.println("La descripcion es: " + desc.toString());
    System.out.println("El precio del objeto es: " + Float.toString(renglones[renglonCnt].getTotal()));
    renglonCnt++;
    This is the Renglon class code:
    import java.awt.*;
    import java.awt.event.*;
    public class Renglon extends Panel implements ActionListener {
    private TextField qty, description, up, total;
    private Button more, less;
    private int cantidad, identificador;
    private float unitP;
    private String descripcion;
    static float elTotal= 0;
    static Panel totalP= new Panel();
    static Label c4tot= new Label();
    public Renglon () {
    this(1, 1, (float) 2.50, "Algun articulo");
    public Renglon (int id, int q, float pu, String desc) {
    identificador= id;
    cantidad= q;
    unitP= pu;
    descripcion= desc;
    elTotal+= cantidad * unitP;
    Panel addsub;
    setLayout (new GridLayout (1,4));
    addsub= new Panel();
    addsub.setLayout(new GridLayout(1,3));
    less= new Button ("<<");
    more= new Button (">>");
    less.addActionListener (this);
    more.addActionListener (this);
    Integer c= new Integer (cantidad);
    qty= new TextField (c.toString());
    description= new TextField (descripcion);
    Float x= new Float (unitP);
    up= new TextField ("$" + x.toString());
    Float t= new Float (getTotal());
    total= new TextField ("$" + t.toString());
    qty.setEditable (false);
    description.setEditable (false);
    up.setEditable (false);
    total.setEditable (false);
    addsub.add (less);
    addsub.add (qty);
    addsub.add (more);
    add (addsub);
    add (description);
    add (up);
    add (total);
    setVisible (true);
    public float getTotal () {
    return ((float) cantidad*unitP);
    public void actionPerformed (ActionEvent e) {
    if (e.getActionCommand().equals("<<")){
    cantidad--;
    elTotal-= unitP;
    if (cantidad < 0) {
    cantidad=0;
         elTotal+= unitP;
    } else {
    cantidad++;
    elTotal+= unitP;
    Float nuevoTot= new Float (getTotal());
    Integer c= new Integer (cantidad);
    qty.setText (c.toString());
    total.setText ("$" + nuevoTot.toString());
    Float et= new Float (elTotal);
    c4tot.setText("$" + et.toString());
    static public Panel Total () {
    totalP.setLayout (new GridLayout(1,4));
    Label c1,c2,c3;
    Float totalF= new Float (elTotal);
    c1= new Label("");
    c2= new Label("");
    c3= new Label("Total:");
    c4tot= new Label("$" + totalF.toString());
    totalP.add(c1);
    totalP.add(c2);
    totalP.add(c3);
    totalP.add(c4tot);
    totalP.setVisible(true);
    return (totalP);
    And just in case, this is the BarraTitulo class code:
    import java.awt.*;
    public class BarraTitulo extends Panel {
    public BarraTitulo (String [] titulos) {
    this (titulos,15);
    public BarraTitulo (String [] titulos, int size) {
    Label labels;
    Font ft= new Font("Serif",Font.BOLD, size);
    int length= titulos.length + 1;
    setLayout (new GridLayout (1,length));
    setFont (ft);
    for (int i=0; i< titulos.length; i++) {
    labels= new Label(titulos);
    add (labels);
    Thanx again for your time.
    Jeronimo

  • Unix script call from java applet

    In perl you can use the system command to call a unix command like mv or ls. How do run a unix command from a java applet?

    normaly java applets are not allowed to execute any code. But there is a possibility to ask the user to be allowed to..
    in Netscpae you can use the following:
    import netscape.security.PrivilegeManager;
    then somewhere in the class...
    PrivilegeManager.enablePrivilege( "UniversalExecAccess" );
    then the user can press 'grant' or 'deni'. If he pressed grant, you can do the following:
    Process process = Runtime.getRuntime().exec( "command" );
    //where command is what ever command you like to execute
    hope that helps.
    lexip

  • I'm trying to develop a PKI enabled plugin for firefox using add-on builder. how do you call a java applet using add-on javascript on add-on builder ?

    i have a signed applet which encrypts and digitally signs text information. i need to call this applet from the add-on javascript on firefox's add-on builder . how do i do it ?
    i've tried using contentScript and contentScriptFile to load the html file which calls the applet vis applet tag , it doesnt work.
    this is the error which croped up:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-383-11A511 Java HotSpot(TM) 64-Bit Server VM
    User home directory = /Users/sreer1990
    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
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.NullPointerException
    at sun.net.www.ParseUtil.toURI(ParseUtil.java:261)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:861)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
    at sun.plugin.PluginURLJarFileCallBack.downloadJAR(PluginURLJarFileCallBack.java:81)
    at sun.plugin.PluginURLJarFileCallBack.access$000(PluginURLJarFileCallBack.java:48)
    at sun.plugin.PluginURLJarFileCallBack$2.run(PluginURLJarFileCallBack.java:150)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.PluginURLJarFileCallBack.retrieve(PluginURLJarFileCallBack.java:127)
    at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:186)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
    at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:201)
    at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(CachedJarURLConnection.java:145)
    at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:91)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(DeployURLClassPath.java:752)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(DeployURLClassPath.java:631)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(DeployURLClassPath.java:698)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(DeployURLClassPath.java:690)
    at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(DeployURLClassPath.java:652)
    at com.sun.deploy.security.DeployURLClassPath$3.run(DeployURLClassPath.java:400)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.deploy.security.DeployURLClassPath.getLoader(DeployURLClassPath.java:389)
    at com.sun.deploy.security.DeployURLClassPath.getLoader(DeployURLClassPath.java:366)
    at com.sun.deploy.security.DeployURLClassPath.getResource(DeployURLClassPath.java:230)
    at sun.plugin2.applet.Plugin2ClassLoader$2.run(Plugin2ClassLoader.java:966)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Plugin2ClassLoader.java:955)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:134)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:240)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:675)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3046)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1498)
    at java.lang.Thread.run(Thread.java:680)
    Exception: java.lang.NullPointerException

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Firefox 2.0.0.8 = security alert when calling a Java applet method

    I have a JavaHelp applet that I launch using a method that I called
    from JavaScript when a user clicks on a link.
    A problem I found with Firefox 2.0.0.8 and JRE 1.4 is that when I
    click on the link it will try to display a security alert window, but
    the window appears to freeze up when it is being displayed and hangs
    the browser. For example, I cannot see any of the buttons that should
    be on the security window. Rather the main window is empty. However,
    if my applet exposes a button that the user can directly click, the
    security window displays properly and can be dismissed.
    With the same JavaHelp applet, the link works fine if I use it Firefox
    2.0 and JRE 1.6 or JRE 1.5, and with IE 6.0 and IE 7.0. I uninstalled
    and reinstalled Firefox with JRE 1.4, and I couldn't reproduce the
    problem. However, I'm concerned that this problem may resurface in
    the future.
    Has anyone ever seem a similar problem? And if so, are there any easy
    workarounds?

    >
    I have a JavaHelp applet.. >I suggest you launch it using Java Web Start (JWS).
    Here is a test of a direct launch of the HelpButton JavaHelp applet.
    <http://www.physci.org/jh/test.html#launch>
    It would only take minor changes to the code to make the button entirely redundant, and have the code automatically launch the HelpViewer, once the user clicks the link to the JNLP launch file.
    That 'JavaHelp/JWS' page is my test page for launching JavaHelp in a variety of forms.

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • Embedded Java Applet NullPointerException in JSPX pages

    We have a ADF web application programmed in JDeveloper 11g (11.1.2.4.0), which was migrated over from a 10g (10.1.3.5.0) project
    Within the application, occasionally, we need to call a Java Applet which is placed in a public_html/applet folder. The jars show up in the Web-Content tab of the ViewController in the Application Navigator, just like it did in 10g.
    The applet tag looks like this:
    <applet height="100" width="100" code="applet.SetupApplet" archive="applet/SSetupApplet.jar">
                <param name="debug" value="true"/>   
    </applet>
    I've also tried calling the applet with the Java deploy applet script
    <trh:script source="http://java.com/js/deployJava.js"></trh:script>
        <trh:script>
            var attributes = {code:'applet.SetupApplet',
            archive:'applet/SSetupApplet.jar'};
            var parameters = {} ;
            var version = '1.6' ;
            deployJava.runApplet(attributes, parameters, version);
       </trh:script>
    When I navigate to the login.jspx page that has this tag, it pops the Java Console open, but doesn't actually run the applet (or show the prompts to allow using the Applet). Instead, the applet is shown with an error and the error says "NullPointerException". I've double-checked the path and it's correct (with incorrect paths, I get a ClassNotFoundException). In the application server logs, I see the following error:
    <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on IPADDRESS during the configured idle timeout of 5 secs>
    I created a normal .jsp file that's outside the ADF Faces Context in the applet folder. Navigating to it with the same applet tags does have the Java applet run without the socket error. The same code in 10g works fine.
    Is there anything I'm missing?
    Thanks.

    Hi,
    this is how I did it in 11g R1: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/71-adf-to-applet-communication-307672.pdf
    Frank

  • Run Priviliged Code in a Java Applet

    I am calling a Java applet from Javascript. The Java code needs to run in privileged mode.  Eventually it is going to display a file chooser which will display files from the local hard disk, but for now it just returns a simple dummy value.  The problem I am having is that the call from JavaScript to Java returns PrivilegedActionException. The applet is in a signed Jar file.  I'm running 8u25.
    Here's the Java class:
        // Java code
        public class OHLib extends Applet {
            public String getFile() {
                String result;
                try {
                    result = (String) AccessController.doPrivileged(new PrivilegedAction() {
                        public String run() {
                            // JFileChooser code will go here
                            return "xxx";
                } catch (Exception e) {
                    e.printStackTrace();
                return result;
    Can anybody tell me what's wrong with this code?  I would also be interested to know why the above try/catch block is not catching the exception.  The only place I see the exception is in the browser F12 developer tools.
    Here's the JavaScript code:
        function BrowseForFile() {
            var x;
            try {
                 // this code generates PrivilegedActionException
                 x = ohApplet.getFile();
            } catch (e) {
                 console.log(e);
    The applet is deployed on my web page as follows:
    <script src="/plugins/deployJava.js"></script>
    <script>
         var attributes = {
             id:'ohApplet',
             code:'OHLib',
             codebase: 'java',
             archive: 'OHLib.jar',
             width:1,
             height:1,
         var parameters = {
          jnlp_href: 'OHLib.jnlp',
          classloader_cache: 'false',
         deployJava.runApplet(attributes, parameters, '1.8');
    <script>
    The applet is in a signed jar file, with the following manifest:
    Application-Name: <appname>
    Permissions: all-permissions
    Codebase: <domain>.dev <domain>.com
    Caller-Allowable-Codebase: <domain>.dev <domain>.com
    Application-Library-Allowable-Codebase: <domain>.dev <domain>.com
    The JNLP file is as follows:
        <?xml version="1.0" encoding="UTF-8"?>
        <jnlp spec="1.0+" codebase="" href="">
            <information>
                <title>title</title>
                <vendor>vendor</vendor>
            </information>
            <security>
                <all-permissions />
            </security>
            <resources>
                <j2se version="1.8+" href="http://java.sun.com/products/autodl/j2se" />
                <jar href="OHLib.jar" main="true" />
            </resources>
            <applet-desc
                 main-class="OHLib"
                 name="OHLib"
                 width="1"
                 height="1">
             </applet-desc>
        </jnlp>       

    The problem was that I was not including the anonymous inner class (OHLib$1.class) in the jar file. My original jar command looked like this:
    jar cfmv OHLib.jar "../../jar_manifest.txt" OHLib.class
    Changing it to below fixed the problem:
    jar cfmv OHLib.jar "../../jar_manifest.txt" OHLib.class OHLib$1.class
    Credits go to this page  for the solution.

  • Java Applet call javascript problem

    Hi I have a web page as follow and embedded a applet. The applet call the java script, and instead of showing an alarm, the browser show the javascript code. Is that strange ? Any suggestion for this problem.
    HTML:
    ================================================================
    <HTML>
         <HEAD>
         function ShowEmbd()
              alert("Test Applet call Javascript");
         </SCRIPT>
         </HEAD>
         <BODY>
         <FORM NAME="AppletEmbdStart">
              <OBJECT classid="clsid:48B2DD7B-6B52-4DB0-97C9-ECB940113B47" id="CIVON_DEmbdObj" width="0" height="0"></OBJECT>
              <APPLET code="MyApplet.class" width="0" height="0"></APPLET>
         </FORM>
         </BODY>
    </HTML>MyApplet.java
    =========================================================================
    import netscape.javascript.*;
    public class MyApplet extends javax.swing.JApplet
         private JSObject m_win = null;
         private JSObject m_doc = null;
         public void init()
              getJSWin().call("ShowEmbd", null);
         private getJSDoc()
              if(m_doc == bull)
                   m_doc = (JSObject) getJSWin().getMember("document");
              return m_doc;
         private JSObject getJSWin()
              if (m_win == null)
                   m_win = netscape.javascript.JSObject.getWindow(this);
              return m_win;
    }The page was load and it should call the applet MyApplet. The MyApplet should do the init() method and call the Javascript "ShowEmbd()", BUT, instead of show alert from ShowEmbd(), the browser show the code of ShowEmbd() itself ...... It did not run the javascript and shows the alert ??
    The browser shows a message from status bar "The applet not initial" ???? why ???
    Can anyone help ?!

    On first look:
    I am not sure about the Object Tag, but the Applet Tag requires the MAYSCRIPT attribute before Java can call Javascript.

  • Computerised call from PC to a mobile using java applets

    i want to know whether it is possible to make a call from PC to mobile using java applets. Please give me a correct reply with proof.

    The situation is like this.
    We are transfering the JAR file from the PC to the Mobile using Bluetooth.
    Our J2ME project is already install on Nokia's 6600 and given to the salesman's on the field. Now i have updated my software and i want to upgrade the same on their mobiles. For this i can't call all the 2000 salesman's who are all over the country (India) to my place to get the latest software installed and configure.
    If i have a GPRS like solution for transfering my file from my PC to the remote mobile. I would be better. If you know any this related to this kindly reply me.

  • Java Applet IIOP Call-In with Release 3C--How do we speed updownload ti

    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the net
    are not uncommon. We dialed into our network at 28.8K (but no hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since the
    introduction of Netscape Navigator 3.0, you can specify an uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP connections
    required to fetch applet code. As an added benefit, Netscape caches the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation for
    its development was so that Java applets and their requisite components
    can be downloaded to a browser in a single HTTP transaction, rather than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to work.
    Has any one used these or other approaches to speed up applet download
    time? Or, does anyone know of consulting firms that specialize in this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157

    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the net
    are not uncommon. We dialed into our network at 28.8K (but no hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since the
    introduction of Netscape Navigator 3.0, you can specify an uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP connections
    required to fetch applet code. As an added benefit, Netscape caches the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation for
    its development was so that Java applets and their requisite components
    can be downloaded to a browser in a single HTTP transaction, rather than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to work.
    Has any one used these or other approaches to speed up applet download
    time? Or, does anyone know of consulting firms that specialize in this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157

  • In a java applet , how to call other jar file?

    i have i programm, this programm is a java application,
    also, i already put these program into jar file, and then if i double this jar file , its work!
    but , now i need to run this program in web browser,
    i thing that i will write a simple applet with a button
    after i click this jButton, how the java applet call and run the java file?
    please help me.. it is because this is my project! thx..........
    [email protected]

    I have a solution write one batch file in that you specify class path and java home.
    then give
    java -jar Test.jar
    then call this batch file from program using Java runtime
    Runtime.exec method...
    Hope will this work

  • Re: [Fwd: Java Applet IIOP Call-In with Release 3C--How dowe speed up d

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

Maybe you are looking for

  • Can't Start Up from OS 9.2.1 CD

    Hello all... I have a powerbook G4 1.25 with OS 10.4.11 installed. I need to install OS 9 so I can recover some of my old work in old applications. I cannot boot from the 9.2.1 CD.. the disk will not show up as a start up option but it does display o

  • When will Creative release information on the next generation X-Fi

    Hi, I'm looking into the Creative Zen X-Fi but there's too many negati'ves surrounding it. No .ogg support, no integration of SD and media, and poor implementation of other features are keeping me away. However, do we know when Creative is going to r

  • My iphone 5 turned off

         I had just finished using my phone and I pressed the lock button (top right button). I put my phone down and then decided to use it again. When I pressed the home button to use the phone again and unlock the screen, nothing happened. The screen

  • Configure Windows file system repository in local portal system

    Hi can any one give the step by step explanation for Configuring windows file system repository in local portal system . Thanks Kirankumar M

  • Itunes 10.6.1.7 - HP Mediasmart server access issues in itunes

    Have just updated itunes to version 10.6.1.7 and having problems with accessing my HP Mediasmart Homeserver. Itunes can see the server on the shared tab, however when I click on the server you get "Loading "HP Mediasmart Server" at the top of the scr