title: Auto-executable .exe within iframe
body: <p>I am trying to run Setup.exe automatically within an iframe.</p>
  
  <p>Once the site visitor into the customer panel after registration bring up a window of java to run the setup.exe</p>
  
  <p>This software will be executed will be a remote access program for my clients who are asking helpdesk.</p>
  
  <p>So I'm trying to make a shape with the client to run my executable directly from the page without the need to download.</p>
  
  <p>See an example of how I'm doing:</p>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>var btnTitleChange = $.button("Let\'s change Frame title")
      .on_click(changeTitle,"Wow, I changed!");
  
  var frame = $.frame("Demo Application")
      .layout($.layout("table",[[20,-1,20],[20,40,10,-1,20]]))
      .add($.button("About").on_click(alert),"1,1")
      .add(btnTitleChange,"1,3");
  
  frame.show();
  
  function changeTitle(title){frame.title(title);}
  
  function alert(){
      js.alert("Welcome to JavaScript executable!"); };
  </code></pre>
  
  <p><strong>includes/java.js</strong></p>
  
  <pre><code>importPackage(Packages.java.lang)
  importPackage(Packages.java.awt)
  importPackage(Packages.java.awt.event)
  importPackage(Packages.javax.swing)
  importPackage(Packages.info.clearthought.layout);
  
  //============================= START OF CLASS ==============================//
  //CLASS: java_object                                                         //
  //===========================================================================//
   /**
    * A reference to the Java Object class
    * @class
    */
  java_object = function(inst){
      /**
       * Data container for this object
       * @private
       */
      this._d = {}
      /**
       * Contains the actual Java instance for this object
       * To access it use the &lt;b&gt;instance()&lt;/b&gt; method
       * @private
       */
      this._inst = new java.lang.Object();    
      this.instance = function(){return this._inst;}
      this.equals = function(o){return (undefined===o._inst)?false:this._inst.equals(o.instance());}
      this.getClass = function(){return this.instance().getClass();}
      this.hashCode = function(){return this.instance().hashCode();}
      this.toString = function(){return this.instance().toString();}
  };
  //===========================================================================//
  //CLASS: java_object                                                         //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: java_component                                                      //
  //===========================================================================//
   /**
    * A reference to the Java Component class
    * @augments java_object
    * @class
    */
  java_component = function(){
      this._inst = null;
      //========================= START OF METHOD ===========================//
      //  METHOD: on_click                                                   //
      //=====================================================================//
         /**
          * Sets a function to be executed, when the mouse is clicked over this
          * widget
          * @param title the title to be shown in the frame
          * @type mixed
          */
      this.on_click=function(fn,arg1,arg2,arg3){
          var adapter  = new java.awt.event.MouseAdapter() {  mousePressed: function(e){fn(arg1,arg2,arg3);} };        
          this.instance().addMouseListener(adapter);
          return this;
      };
      //=====================================================================//
      //  METHOD: on_click                                                   //
      //========================== END OF METHOD ============================//
  };
  java_component.prototype = new java_object();
  java_component.constructor == java_object;
  //===========================================================================//
  //CLASS: java_component                                                      //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: java_container                                                         //
  //===========================================================================//
   /**
    * A reference to the Java Container class
    * @augments java_component
    * @class
    */
  java_container = function(){
      this._inst = new java.awt.Container();  
      //========================= START OF METHOD ===========================//
    //  METHOD: add                                                        //
    //=====================================================================//
         /**
          * Adds an object to the container.
          * @type void
          */
      this.add=function(object,constraints){
          if(undefined==constraints){
              (undefined===object.instance)?this.instance().add(object):this.instance().add(object.instance());
          }else{
              if(constraints.toUpperCase()=="NORTH"){
                  (undefined===object.instance)?this.instance().add(object,BorderLayout.NORTH):this.instance().add(object.instance(),BorderLayout.NORTH);
              }else if(constraints.toUpperCase()=="SOUTH"){
                  (undefined===object.instance)?this.instance().add(object,BorderLayout.SOUTH):this.instance().add(object.instance(),BorderLayout.SOUTH);
              }else if(constraints.toUpperCase()=="EAST"){
                  (undefined===object.instance)?this.instance().add(object,BorderLayout.EAST):this.instance().add(object.instance(),BorderLayout.EAST);
              }else if(constraints.toUpperCase()=="WEST"){
                  (undefined===object.instance)?this.instance().add(object,BorderLayout.WEST):this.instance().add(object.instance(),BorderLayout.WEST);
              }else{
                  (undefined===object.instance)?this.instance().add(object,constraints):this.instance().add(object.instance(),constraints);
              }
          }
          return this;
      };
    //=====================================================================//
    //  METHOD: add                                                        //
    //========================== END OF METHOD ============================//
  
    //========================= START OF METHOD ===========================//
    //  METHOD: layout                                                     //
    //=====================================================================//
         /**
          * Sets the layout for this container.
          * @type void
          */
      this.layout = function(layout){
          (undefined===layout.instance)?this.instance().setLayout(layout):this.instance().setLayout(layout.instance());
          return this;
      };
      //=====================================================================//
    //  METHOD: layout                                                     //
    //========================== END OF METHOD ============================//
  
      return this;
  }
  java_container.prototype = new java_component();
  java_container.constructor == java_component;
  //===========================================================================//
  //CLASS: j_container                                                         //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: java_frame                                                          //
  //===========================================================================//
   /**
    * A reference to the Java Window class
    * @class
    */
  java_frame = function(title){
      this._inst = (undefined===title)?new javax.swing.JFrame(""):new javax.swing.JFrame(title);  
      this._inst.setSize(600,400);    
      this._inst.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  
      //========================= START OF METHOD ===========================//
    //  METHOD: show                                                       //
    //=====================================================================//
      this.show=function(){this._inst.setVisible(true);};
      //=====================================================================//
    //  METHOD: show                                                       //
    //========================== END OF METHOD ============================//
  
      //========================= START OF METHOD ===========================//
    //  METHOD: close                                                      //
    //=====================================================================//
      this.close=function(){this._inst.setVisible(false);};
      //=====================================================================//
    //  METHOD: close                                                      //
    //========================== END OF METHOD ============================//
  
      //========================= START OF METHOD ===========================//
    //  METHOD: on_close                                                   //
    //=====================================================================//
         /**
          * Sets or retrieves the title of this frame.
          * @param title the title to be shown in the frame
          * @type mixed
          */
      this.on_close=function(fn,arg1,arg2,arg3){
          var adapter  = new java.awt.event.WindowAdapter() { windowClosing: function(e){fn(arg1,arg2,arg3);} };
          this.instance().addWindowListener(adapter);
          return this;
      };
      //=====================================================================//
    //  METHOD: on_close                                                   //
    //========================== END OF METHOD ============================//
  
    //========================= START OF METHOD ===========================//
    //  METHOD: title                                                      //
    //=====================================================================//
         /**
          * Sets or retrieves the title of this frame.
          * @param title the title to be shown in the frame
          * @type mixed
          */
      this.title=function(/**String*/title){
          if(undefined===title)return this.instance().getTitle();
          else{this.instance().setTitle(title);}
          return this;
      };
      //=====================================================================//
    //  METHOD: title                                                      //
    //========================== END OF METHOD ============================//
      return this;
  }
  java_frame.prototype = new java_container();
  java_frame.constructor == java_container;
  //===========================================================================//
  //CLASS: j_frame                                                             //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: j_layout                                                            //
  //===========================================================================//
  /**
  * A reference to the Java Container class
  * @augments j_object
  * @class
  */
  java_layout = function(type,constraints){
      if(type==="border")this._inst = new java.awt.BorderLayout();
      if(type==="flow")this._inst = new java.awt.FlowLayout();
      if(type==="table"){
          this._inst = new TableLayout(constraints);
      }   
      return this;
  }
  java_layout.prototype = new java_object();
  //===========================================================================//
  //CLASS: j.layout                                                            //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: j_button                                                            //
  //===========================================================================//
   /**
    * A reference to the Java JButton class
    * &lt;div style="position: relative; top: 10px; left: 10px; font-size: 11px; font-family: verdana; color:crimson;"&gt;&amp;nbsp;Example&amp;nbsp;&lt;/div&gt;
    * &lt;div style="border: 1px dashed silver; margin: 10px; padding: 5px; background: cornsilk; font-family: monospace; font-size: 12px;"&gt;
    * var button = new j_button();&lt;br&gt;
    *     button.text("Click me");&lt;br&gt;
    *     button.on_click(js.alert,"I was clicked");
    * &lt;/div&gt;
    * @augments j_component
    * @class    
    */
  java_button = function(text){
      this._inst = (undefined===text)?new javax.swing.JButton(""):new javax.swing.JButton(text);
      //========================= START OF METHOD ===========================//
    //  METHOD: text                                                       //
    //=====================================================================//
      this.text=function(text){
          if(undefined===text){return this.instance().getText();}
          this.instance().setText(text);
      };
      //=====================================================================//
    //  METHOD: text                                                       //
    //========================== END OF METHOD ============================//
      return this;
  }
  java_button.prototype = new java_component();
  //===========================================================================//
  //CLASS: java_button                                                         //
  //============================== END OF CLASS ===============================//
  
  //============================= START OF CLASS ==============================//
  //CLASS: namespace                                                           //
  //===========================================================================//
  /** @namespace */
  $ = {
      _button:java_button,
      _frame:java_frame,
      _layout:java_layout,
      _object:java_object,
      button:function(name){
          return new this._button(name);
      },
      frame:function(title){
          return new this._frame(title);
      },
      layout:function(name,constraints){
          return new this._layout(name,constraints);
      },
      object:function(){
          return new this._object();
      }
  };
  //===========================================================================//
  //CLASS: namespace                                                           //
  //============================== END OF CLASS ===============================//
  </code></pre>
  
  <p><strong>includes/js.js</strong></p>
  
  <pre><code>/** @namespace */
  js = {
      _loaded:[], // Reference to all the loaded script files
      alert:function(msg){
          JOptionPane.showMessageDialog(null, "&lt;html&gt;&lt;font size=\"3\" color=\"red\"&gt;"+msg+"&lt;/font&gt;&lt;/html&gt;", "Alert",JOptionPane.WARNING_MESSAGE);
      },
      echo:function(msg){System.out.print(msg);},
      getcwd:function(){
          return System.getProperty("user.dir");
      },
      include:function(path){
          var id = path.split("\\").join("_").split(" ").join("___");
          if(undefined === this._loaded[id]){this._loaded[id]=id;}
          load(path.split("\\").join("/"));
      },
      include_once:function(path){
          var id = path.split("\\").join("_").split(" ").join("___");
          if(undefined === this._loaded[id]){
              this._loaded[id]=id; load(path.split("\\").join("/"));
          }
      },
      version:1.2
  }
  js.include("includes/java.js");
  </code></pre>
  
  <p><strong>I would like to stay as shown in the image link:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/d1pTi.jpg" alt=""></p>
  
  <p>If anyone can send me a ready with Iframe ready so I can study more about it and be able to practice.</p>