CN113741992A - Method for embedding Java application program window into browser - Google Patents

Method for embedding Java application program window into browser Download PDF

Info

Publication number
CN113741992A
CN113741992A CN202010410876.9A CN202010410876A CN113741992A CN 113741992 A CN113741992 A CN 113741992A CN 202010410876 A CN202010410876 A CN 202010410876A CN 113741992 A CN113741992 A CN 113741992A
Authority
CN
China
Prior art keywords
browser
plug
java
window
embedding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010410876.9A
Other languages
Chinese (zh)
Inventor
张克俊
江宝歆
丁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yozosoft Co ltd
Original Assignee
Yozosoft Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yozosoft Co ltd filed Critical Yozosoft Co ltd
Priority to CN202010410876.9A priority Critical patent/CN113741992A/en
Publication of CN113741992A publication Critical patent/CN113741992A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for embedding a Java application program window into a browser, which comprises the following steps: the method comprises the steps that at least one interface plug-in object is realized in a browser, the browser loads a webpage with a plug-in identifier, and the plug-in object is identified and loaded by a browser process; starting a new process immediately after the plug-in object is successfully loaded by the browser process, and transmitting the instruction data of the plug-in object to the new process; and after receiving the instruction data transmitted by the plug-in object, the new process starts the Java virtual machine and creates a Java EmbeddFrame window program through the transmitted window object. The method for embedding the Java application program window into the browser obviously improves the performance, stability and usability.

Description

Method for embedding Java application program window into browser
Technical Field
The invention relates to the technical field of browsers, in particular to a method for embedding a Java application program window into a browser.
Background
Users often use embedded Java programs in browser pages to interactively communicate with the browser pages, which commonly use Java Applet technology, but the following main problems exist when the Java Applet technology is used.
a) The performance is lower, the time for loading the Java Applet after the browser is started is 30% more than that for independently starting a Java Application program Windows platform, and the time for starting the Linux platform is 150% more.
b) If the user machine is provided with an Applet program supporting two JRE versions, only one high-version JRE Applet program can be started, and if a low-version Applet program needs to be started, the high-version JRE needs to be manually uninstalled and needs to be reconfigured.
c) Poor stability, complicated configuration, great influence by the environment of the operating system browser, failure of configuration and incapability of starting the Applet.
Therefore, in combination with the above-mentioned technical problems, there is a need to provide a new technical solution.
Disclosure of Invention
In order to solve the problems, the invention aims to design a uniform cross-platform technical scheme, which uses a data exchange abstract interface, a multi-process UI interface and an external call uniform interface. The method supports the realization of embedding Java programs into browsers of Windows and Linux platforms, improves the performance and is convenient to deploy and upgrade. The specific technical scheme is as follows:
the invention discloses a method for embedding a Java application program window into a browser, which comprises the following steps:
the method comprises the steps that at least one interface plug-in object is realized in a browser, the browser loads a webpage with a plug-in identifier, and the plug-in object is identified and loaded by a browser process;
starting a new process immediately after the plug-in object is successfully loaded by the browser process, and transmitting the instruction data of the plug-in object to the new process;
and after receiving the instruction data transmitted by the plug-in object, the new process starts the Java virtual machine and creates a Java EmbeddFrame window program through the transmitted window object.
Further, data is communicated and transferred between the plug-in object and the started new process through the Socket.
Further, the browser is an IE browser, and the iolefinaceaceobject, the iolefinaceobject, and the IOleObject interface plug-in object are implemented in the IE browser.
Further, the browser is a FireFox browser, and the NPAPI interface plug-in object is realized in the FireFox browser.
The method for embedding the Java application program window into the browser has one or more of the following beneficial effects:
(1) the method for embedding the Java application program window into the browser respectively realizes the Java program and the plug-in object in the two processes, ensures the stability of the two processes, and can not cause the crash of one process due to the crash of the other process;
(2) the method for embedding the Java application program window into the browser realizes uniform program set interfaces (attributes, methods and events) called by IE and FireFox browsers in the plug-in object, ensures that the same JavaScript codes can run on the IE and FireFox browsers, and ensures that the functions of calling the interfaces are consistent;
(3) according to the method for embedding the Java application program window into the browser, the data interface abstract layer is realized and is respectively realized in the browser process plug-in object and the Java process, and the efficiency of communication between the processes is improved through the interaction of abstract data of two processes of Socket communication;
(4) the method for embedding the Java application program window into the browser obviously improves the performance, stability and usability.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The present invention will be more readily understood by reference to the following detailed description when considered in conjunction with the accompanying drawings, wherein like reference numerals designate like structural elements, and in which:
FIG. 1 is a diagram of Windows IE embedded Java program (Office for ever) effects;
FIG. 2 is a diagram of Windows IE embedded Java program (Office for ever) effects;
FIG. 3 is a diagram of Linux FireFox embedded Java program (Office for ever) effects;
FIG. 4 is a flowchart illustrating an embodiment of a Java application window embedding browser method according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least an implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
The invention provides a method for embedding a Java application program window into a browser, which uses a data exchange abstract interface, a multi-process UI interface and an external call unified interface. The method supports the realization of embedding Java programs into browsers of Windows and Linux platforms, improves the performance and is convenient to deploy and upgrade. The method comprises the following specific steps:
the IE browser realizes the interface plug-in objects such as IOLeInPlaceActiveObject, IOLeInPlaceObject, IOLeObject and the like, the FireFox browser realizes the interface plug-in objects such as NPAPI and the like, when the browser loads the webpage with the plug-in identifier, the plug-in object is identified and loaded by the browser process,
Figure BDA0002493185510000031
and after the plug-in object is successfully loaded by the browser process, a new process is immediately started, the plug-in object (a browser window and other data structures corresponding to the plug-in object) is transmitted to the new process, and the plug-in object process and the started new process communicate and transmit data through Socket. And after receiving the instruction data transmitted by the plug-in object, the newly-created process respectively starts the Java virtual machines, creates a Java EmbeddFrame window program through the transmitted window object, realizes the embedding of the Java window into the browser window and simultaneously returns the result to the plug-in object.
Wherein, the Windows IE embedded Java program (Office for ever) effect graph is shown in FIG. 1; the Windows IE embedded Java program (Office for ever) effect graph is shown in FIG. 2; the Linux FireFox embedded Java program (Office for ever) effect graph is shown in fig. 3; the flow chart of the method for embedding the Java application program window into the browser in one embodiment of the invention is shown in FIG. 4.
In one embodiment, the Java program and the plug-in object are respectively realized in the two processes, so that the stability of the two processes is ensured, and the crash of one process cannot be caused by the crash of the other process.
In one embodiment, a uniform assembly interface (attribute, method, event) called by an IE browser and a FireFox browser is realized in a plug-in object, so that the same JavaScript code can run on the IE browser and the FireFox browser, and the calling interface functions are ensured to be consistent.
In one embodiment, the data interface abstraction layer is realized in the browser process plug-in object and the Java process respectively, and the efficiency of communication between the processes is improved through the abstraction data interaction of two processes of Socket communication.
After the technical scheme is tested, the performance, stability and usability are obviously improved, the loading speed of a Windows platform loaded with the same Java program (Office for ever) is improved by 20% compared with that of an Applet, and the loading speed of a Linux platform is improved by 125% compared with that of the Applet. The product is ready for use, and does not need manual configuration by a user. Is not affected by the operating system browser environment and other versions of the JRE.
Taking an example of invoking a permanent Office (java program) search in a browser page, the program code is as follows:
Figure BDA0002493185510000041
the method comprises the steps of executing a code document, getElementById ("Office") and then returning a plug-in object with an ID (identity) of Office, wherein the plug-in object realizes an Office interface program set (attribute, method and event), when executing a const document, yozooffice, Application and active statement, an interface calling layer calls the Application attribute of the plug-in object Office program set, the Application attribute is forwarded to a permanent Office program (Java process) through a Socket after being processed by a data abstraction layer of the plug-in object, a corresponding Java program Application attribute interface is called after being processed by an abstraction data layer of a Java process end, a result is forwarded to a plug-in object process for processing through the Socket after being processed by the Java abstraction data layer, and the active document attribute is operated as above.
After executing a doc, application, selection, file, execution (text, false, false, false, true, true, true, false, false) statement, the plug-in object data abstraction layer uniformly processes the method calling name and the parameter 'thousand lines' and then forwards the processed result to the Java instance process, the interface implementation layer calls the corresponding Java program execution interface after the data abstraction layer at the Java instance process end processes, and the keyword highlight display of 'thousand lines' is contained in the function implementation layer permanent Office (Java program) text.
The foregoing description has disclosed fully preferred embodiments of the present invention. It should be noted that those skilled in the art can make modifications to the embodiments of the present invention without departing from the scope of the appended claims. Accordingly, the scope of the appended claims is not to be limited to the specific embodiments described above.

Claims (4)

1. A method for embedding a Java application program window into a browser is characterized by comprising the following steps:
the method comprises the steps that at least one interface plug-in object is realized in a browser, the browser loads a webpage with a plug-in identifier, and the plug-in object is identified and loaded by a browser process;
starting a new process immediately after the plug-in object is successfully loaded by the browser process, and transmitting the instruction data of the plug-in object to the new process;
and after receiving the instruction data transmitted by the plug-in object, the new process starts the Java virtual machine and creates a Java EmbeddFrame window program through the transmitted window object.
2. The method for embedding the Java application program window into the browser is characterized in that data are communicated and transferred between the plug-in object and the started new process through a Socket.
3. The method of claim 1, wherein the browser is an IE browser, and the IE browser implements IOleInPlaceActiveObject, IOleInPlaceObject, and IOleObject interface plug-in objects.
4. The method for embedding Java application windows in a browser according to claim 1, wherein the browser is a FireFox browser, and the NPAPI plug-in object is implemented in the FireFox browser.
CN202010410876.9A 2020-05-15 2020-05-15 Method for embedding Java application program window into browser Pending CN113741992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010410876.9A CN113741992A (en) 2020-05-15 2020-05-15 Method for embedding Java application program window into browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010410876.9A CN113741992A (en) 2020-05-15 2020-05-15 Method for embedding Java application program window into browser

Publications (1)

Publication Number Publication Date
CN113741992A true CN113741992A (en) 2021-12-03

Family

ID=78723426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010410876.9A Pending CN113741992A (en) 2020-05-15 2020-05-15 Method for embedding Java application program window into browser

Country Status (1)

Country Link
CN (1) CN113741992A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567065A (en) * 2009-05-26 2009-10-28 杭州世导科技有限公司 Cross-platform online file editing system and method thereof
CN103049320A (en) * 2012-12-17 2013-04-17 广州市动景计算机科技有限公司 Method and device for starting external application program in browser
CN103064738A (en) * 2013-01-15 2013-04-24 珠海金山办公软件有限公司 Method and system for embedding local application program window into browser in Linux
CN110569076A (en) * 2018-05-17 2019-12-13 长沙博为软件技术股份有限公司 method for realizing plug-in based on embedded browser console application program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567065A (en) * 2009-05-26 2009-10-28 杭州世导科技有限公司 Cross-platform online file editing system and method thereof
CN103049320A (en) * 2012-12-17 2013-04-17 广州市动景计算机科技有限公司 Method and device for starting external application program in browser
CN103064738A (en) * 2013-01-15 2013-04-24 珠海金山办公软件有限公司 Method and system for embedding local application program window into browser in Linux
CN110569076A (en) * 2018-05-17 2019-12-13 长沙博为软件技术股份有限公司 method for realizing plug-in based on embedded browser console application program

Similar Documents

Publication Publication Date Title
US10904361B2 (en) Method, apparatus, and system for implementing JAVA application installation by means of cloud compilation
CN107861713B (en) Data calling method and device and computer readable storage medium
EP2168050B1 (en) Running add-on components in virtual environments
CN107992308B (en) Plug-in management method for android terminal application program
CN109240697B (en) Call processing method and device and storage medium
EP2444892A1 (en) Method and device for generating software installation packet
WO2016177341A1 (en) Interface calling method and device, and terminal
CN106055368B (en) application updating method and device
CN103064680B (en) The player method of plug-in unit and device in browser
CN108762956B (en) Method for acquiring Native local data, server, mobile terminal and storage medium
CN113420268B (en) Watermark adding method, device, equipment and storage medium
JP2022505656A (en) Sub-application development methods, equipment, computer equipment, and computer programs
CN110569473A (en) Method for remotely operating linux server based on SSH protocol
CN115033235A (en) System and method for flexibly multiplexing web page based on low-code development platform
CN108845800B (en) Method, device, equipment and storage medium for realizing component extension function
CN105897902B (en) It is a kind of to start locally applied method and system by browser
KR101117165B1 (en) Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system
CN109299331B (en) Method and device for displaying hypertext markup language HTML5 page by Air
CN109408256B (en) Application calling method and device
US11379201B2 (en) Wrapping method, registration method, device, and rendering apparatus
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN103077047B (en) A kind of plug-in playback method and device
JP2006276939A (en) Program starting method for virtual machine, and client server system
CN113741992A (en) Method for embedding Java application program window into browser
US20150154314A1 (en) Method, apparatus and terminal for webpage content browsing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination