WO2012106989A1 - Java应用程序的安装方法和终端设备 - Google Patents

Java应用程序的安装方法和终端设备 Download PDF

Info

Publication number
WO2012106989A1
WO2012106989A1 PCT/CN2012/070965 CN2012070965W WO2012106989A1 WO 2012106989 A1 WO2012106989 A1 WO 2012106989A1 CN 2012070965 W CN2012070965 W CN 2012070965W WO 2012106989 A1 WO2012106989 A1 WO 2012106989A1
Authority
WO
WIPO (PCT)
Prior art keywords
java application
application
copy
installation
java
Prior art date
Application number
PCT/CN2012/070965
Other languages
English (en)
French (fr)
Inventor
郑瑜
Original Assignee
惠州Tcl移动通信有限公司
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 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Publication of WO2012106989A1 publication Critical patent/WO2012106989A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Definitions

  • the present invention relates to communication technologies, and in particular, to a method of installing a JAVA application and a terminal device using the same.
  • JAVA is a commonly used technology for implementing cross-platform applications. It can be used for cross-border applications at very low cost on devices of different operating systems. Therefore, it is widely used in mobile communication fields, such as mobile communication terminal devices, such as Mobile phone, personal digital assistant (Personal Digital Assistant, PDA) and car navigation systems.
  • mobile communication terminal devices such as Mobile phone, personal digital assistant (Personal Digital Assistant, PDA) and car navigation systems.
  • PDA Personal Digital Assistant
  • the JAVA platform is a JAVA language platform for terminal devices, which is usually powered by JAVA Virtual (JAVA Virtual Machine) and JAVA application programming interface (Application Programming Interface, API) constitutes.
  • JAVA Virtual JAVA Virtual Machine
  • API Application Programming Interface
  • the JAVA application can run on the operating system of the terminal device.
  • the JAVA application can be run in various systems only by one compilation.
  • J2ME Java 2 Micro Edition
  • J2ME Java 2 Micro Edition
  • J2ME Java 2 Micro Edition
  • J2ME Java 2 Micro Edition
  • the starting point of the J2ME specification is that since the device is a mobile small device, only the same JAVA application can be run at the same time. Since the multi-instance requirements of the application were not considered early in the technology, the prior art could not implement multiple application instances installed and running on the same device through one installer.
  • the installation method of the JAVA application comprises: determining whether a JAVA application has been installed; if the JAVA application has been installed, copying a copy of the installation file of the JAVA application, and copying the installation file
  • the application identification value is modified so that it is different from the identification value corresponding to the already installed JAVA application; the JAVA application is installed using the modified copy of the installation file.
  • the application identification value is a value of an application name parameter in the installation file for uniquely identifying the JAVA application.
  • the application identifier value in the modified copy is a parameter value-number format, where the parameter value is a value of an application name parameter in an installation file of the JAVA application, and the number is the copy Corresponding number.
  • the steps of modifying the application identification value in the copy of the installation file include:
  • the steps of determining whether the JAVA application has been installed include:
  • the application name parameter it is determined whether a JAVA application with the same name and the same version number is installed in the local machine, and if so, it is determined that the JAVA application is already installed on the local machine.
  • the method for installing the JAVA application further includes:
  • the user Before copying the copy of the installation file of the JAVA application, the user is prompted to select whether to perform the installation of the shadow instance by displaying the information;
  • the recorded signature information is used during the installation of the JAVA application.
  • the terminal device provided by the present invention includes a JAVA application installation module for determining whether a JAVA application has been installed, copying a copy of the installation file of the JAVA application when the JAVA application has been installed, and installing the JAVA application
  • the application identification value in the copy of the file is modified to be different from the identity value corresponding to the already installed JAVA application, and the JAVA application is installed using the modified copy of the installation file; the JAVA application runs A module for executing a JAVA application installed by the JAVA application installation module 210.
  • the JAVA application installation module includes a determination sub-module for determining whether the JAVA application has been installed, where the determination sub-module includes:
  • a parameter obtaining unit configured to acquire an application name parameter as the JAVA application identifier value from an installation file of the JAVA application;
  • a judging unit configured to determine, according to the application name parameter, whether a JAVA application having the same name and the same version number is installed in the terminal device, and if yes, determining that the JAVA application has been installed in the terminal device.
  • the application identifier value in the modified copy of the installation file is a “parameter value-number” format, where the parameter value is a value of an application name parameter in an installation file of the JAVA application, and the number is a number corresponding to the copy
  • the JAVA application installation module further includes a parameter modification submodule for modifying an application identification value in a copy of the installation file, wherein the parameter modification submodule includes :
  • a searching unit configured to find the number of the JAVA application that has been installed and the used number, and specify the JAVA application to be installed according to the number of the JAVA application that has been installed and the used number. a different number;
  • a parameter modification unit configured to add a number suffix to the application name parameter in the copy of the installation file, where the number suffix is the specified number
  • the identifier value as the JAVA application is modified during the installation process of the JAVA application so as to be different from the identifier value corresponding to the already installed JAVA application, thereby avoiding
  • the technical limitations of the J2ME specification enable the installation and operation of a new application instance, allowing multiple application examples to be installed and run on the same terminal device, solving the existing technology that cannot be installed and run on the same device. The problem with the application instance.
  • FIG. 1 is a flowchart of an embodiment of a method for installing a JAVA application provided by the present invention
  • FIG. 2 is a schematic structural diagram of an embodiment of a terminal device according to the present invention.
  • the present invention first provides a method for installing a JAVA application program, which is adopted in the J2ME technical specification.
  • the installation process is extended, and when a duplicate application instance needs to be installed and run, a copy of the original installation file is automatically created and the relevant parameters are automatically modified, and then the new application is executed according to the permission attribute of the original installation file.
  • the installation of the instance enables multiple application instances to be installed and run on the same terminal device.
  • the J2ME specification requires a Java application, such as a mobile information device applet (Mobile Information) Devices applet,
  • the unique identifier of the MIDlet is the application name parameter, which is the "MIDlet-Name” parameter, which comes from the installation file of the JAVA application, and the parameter is usually written in a ".jad file” in plaintext string, or at the same time.
  • the embodiment provided by the present invention implements the installation and running of a new application instance by changing the above parameter values during the installation process of the JAVA application, thereby avoiding the technical limitations of the J2ME specification.
  • An application instance is called a shadow instance.
  • FIG. 1 is a flowchart of an embodiment of a method for installing a JAVA application provided by the present invention.
  • the JAVA application installation method may include:
  • step S1 is first executed.
  • step S1 the signature information of the installation file is checked.
  • the signature information ie, the source of the signed certificate
  • the installation file may include a ".jar file” and a ".jad file.
  • step S1 if the ".jad file” does not exist or the ".jad file” exists but there is no signature information, the JAVA application is installed after being installed. If the signature information of the installation file is incorrect, stop the installation; if the signature information of the installation file is correct, that is, the signature information of the installation file passes the J2ME legality verification principle, the installation can be continued. Go to step S2.
  • step S2 if the signature information is verified, the signature information is recorded, including the level of the signature, etc., and is transferred from step S3.
  • step S3 it is checked whether the JAVA application is already installed locally according to the value of the "MIDlet-Name” parameter of the installation file.
  • the ".jad file” may be parsed first, or the MANIFEST.MF file in the ". ⁇ META-INF ⁇ ” directory in the ".jar file package” may be parsed to identify the "”.
  • step S9 it is determined whether a "JAVA application with the same name and the same version number" has been installed in the device. If not, proceed to step S9 to complete the installation of the JAVA application according to the standard installation process of the J2ME specification.
  • the specific installation process may refer to the description of the J2ME specification, and details are not described herein. If there is a JAVA application of "same name and same version number" already installed in the device, then go to step S4.
  • Step S4 if the JAVA application has been installed locally, for example, if it is determined in step S3 that a JAVA program having the same name and the same version is already installed in the device, prompting the user to select whether to overwrite the existing installation instance or Perform a shadow instance installation (ie install a new instance). In a specific embodiment, the user may be prompted to select through the operating system by displaying information. If the user chooses to overwrite the installation, then go to step S9 to complete the installation of the JAVA application in accordance with the standard installation process of the J2ME specification. If the user chooses to install the shadow instance, it proceeds from step S5.
  • step S5 if the user selects to install the shadow instance, copy a copy of the installation file.
  • the system will receive the corresponding operation instruction.
  • the copy of the installation file copy may be performed in the memory or the file system, that is, The ".jar file” and “.jad file” are copied in the memory or file system, and are transferred from step S6.
  • step S6 the value of the "MIDlet-Name” parameter in the copy of the installation file is modified so that the value of the "MIDlet-Name” parameter in the copy is different from the value of the "MIDlet-Name” parameter corresponding to the already installed instance.
  • step S6 may include the following sub-steps:
  • the number of shadow instances that have been installed and the used numbers specify a different number for the new shadow instance to be installed. For example, you can add 1 to the largest number that has been used as a new installation.
  • the number of the shadow instance, or the specified number can also be used as the number of the copy of the installation file;
  • step S7 the JAVA application is installed by using the modified copy of the installation file. Since in the modified copy of the installation file, the value of the "MIDlet-Name" parameter that is uniquely identified by the JAVA application has been modified to be different from the value of the "MIDlet-Name” parameter corresponding to the already installed application instance, The technical limitations of the J2ME specification can be circumvented to enable installation and operation of a new instance without violating the J2ME specification. In addition, in the installation process of step S7, it is not necessary to verify the validity of the signature again, and the installation process uses the already recorded signature.
  • step S8 the result of the JAVA application installation is displayed to the user, and after the installation is completed, the copy of the used installation file is deleted to release the storage space.
  • the J2ME specification technology is avoided by modifying the value of the "MIDlet-Name" parameter which is the unique identifier of the JAVA application during the installation process of the JAVA application. Restrictions, implement installation and run a new instance to solve the problems of the prior art.
  • the present invention further provides a terminal device based on the installation method of the JAVA application described above.
  • FIG. 2 is a schematic structural diagram of an embodiment of a terminal device according to the present invention.
  • the terminal device may be a mobile terminal device, and the installation method of the JAVA application may be performed by using the installation method of the JAVA application, and the terminal device may include:
  • a JAVA application installation module 210 for determining whether a JAVA application has been installed in the terminal device 200, copying a copy of the installation file of the JAVA application when the JAVA application has been installed, and installing the JAVA application
  • the application identification value in the copy of the file is modified to be different from the identification value corresponding to the already installed JAVA application, and the JAVA application is installed using the modified copy of the installation file;
  • the JAVA application execution module 220 is configured to execute the JAVA application installed by the JAVA application installation module 210.
  • the JAVA application installation module 210 may include:
  • a determining sub-module 211 configured to determine whether the JAVA application has been installed in the terminal device 200
  • the copy sub-module 212 is configured to copy a copy of the installation file of the JAVA application when the determining sub-module 211 determines that the terminal device 200 has installed the JAVA application;
  • a parameter modification submodule 213, configured to modify an application identifier value in a copy of the installation file provided by the replication submodule 212;
  • the program installation sub-module 214 is configured to perform installation of the JAVA application in the terminal device 200 by using a modified copy of the installation file.
  • the determining submodule 211 may include:
  • a parameter obtaining unit 201 configured to acquire, as an identifier of the JAVA application identifier, a "MIDlet-Name" parameter from an installation file of the JAVA application;
  • the determining unit 202 is configured to determine, according to the “MIDlet-Name” parameter, whether a JAVA application with “same name and same version number” is installed in the terminal device, and if yes, determine that the JAVA application is installed in the terminal device.
  • the terminal device ;
  • the parameter modification submodule 213 may include:
  • the searching unit 203 is configured to find the number of the JAVA application that has been installed and the used number, and prepare the installed JAVA application according to the number of the JAVA application that has been installed and the used number. Specify a different number;
  • the parameter modification unit 204 is configured to add a number suffix to the “MIDlet-Name” parameter in the copy of the installation file, where the number suffix is the specified number.
  • each of the functional modules and functional units shown in FIG. 2 may be software modules that may be implemented by a processor inside the terminal device 200 to perform the above-described JAVA application installation method.
  • the terminal device 200 may have other functional modules or functional units to implement other steps in the above-described JAVA application installation method.
  • the specific functions performed by the function module or the function unit shown in FIG. 2 may refer to the technical details of the steps related to the installation method of the JAVA application, and the function module shown in FIG. 2 may also have the technology for implementing the technology. Other submodules or functional units of detail.

Landscapes

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

Abstract

本发明提供一种JAVA应用程序的安装方法和终端设备,其中所述安装方法包括:判断JAVA应用程序是否已经安装;如果已经安装所述JAVA应用程序,复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同;利用修改后的安装文件副本进行所述JAVA应用程序的安装。采用本发明提供的JAVA应用程序的安装方法可以在终端设备已经安装JAVA应用程序的情况下安装并运行一个新的应用程序实例,从而实现在同一台终端设备安装并运行多个运用程序示例,解决现有技术存在的无法在同一台设备上安装并运行多个应用程序实例的问题。

Description

JAVA应用程序的安装方法和终端设备
【技术领域】
本发明涉及通信技术,特别地,涉及一种JAVA应用程序的安装方法和使用该方法的终端设备。
【背景技术】
JAVA是一种常用的实现跨平台应用的技术,其可以在不同的操作系统的设备上以非常低的成本进行跨界应用,因此被广泛地应用在移动通信领域,比如移动通信终端设备,如移动电话、个人数字助理(Personal Digital Assistant, PDA)和汽车导航系统等。
JAVA平台是为终端设备提供的JAVA语言平台,其通常由JAVA虚拟机(JAVA Virtual Machine)和JAVA应用编程接口(Application Programming Interface, API)构成。通常,在终端设备的操作系统基础上安装JAVA平台之后,JAVA应用程序便可在该终端设备的操作系统运行,由此,JAVA应用程序只通过一次编译,就可以在各种系统中运行。
J2ME(Java 2 Micro Edition)是JAVA 2应用在移动小型设备的一种基础技术规范,其可实现将JAVA语言所具有的与平台无关的特性移植到如移动终端设备等小型电子设备,以允许移动终端设备之间共享应用程序。J2ME规范的规划出发点是,由于设备是移动小型设备,故同一时刻只能运行同一个JAVA应用程序。由于技术诞生早期没有考虑应用程序的多实例需求,所以现有技术无法实现通过一个安装程序在同一台设备上安装并运行多个应用程序实例。
不过,随着JAVA技术在移动终端设备的普及应用,上述在终端设备上通过一个安装程序来安装并运行多个应用程序实例成为一种需求,比如在即时通信业务应用上,用户可能希望有同时运行和登陆多个账户,而由于JAVA J2ME规范的限制,现有技术的JAVA虚拟机并无法实现上述需求。
【发明内容】
针对上述问题,有必要提供一种可实现在同一台设备安装并运行多个应用程序示例的JAVA应用程序安装方法,同时有必要提供一种可实现安装并运行多个应用程序示例的终端设备。
本发明提供的JAVA应用程序的安装方法包括:判断JAVA应用程序是否已经安装;如果已经安装所述JAVA应用程序,复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同;利用修改后的安装文件副本进行所述JAVA应用程序的安装。
所述应用程序标识值为所述安装文件中用于对所述JAVA应用程序进行唯一标识的应用程序名称参数的值。
所述修改后的副本中的应用程序标识值为“参数值-编号”格式,其中参数值为所述JAVA应用程序的安装文件中的应用程序名称参数的值,所述编号为所述副本所对应的编号。
所述对安装文件的副本中的应用程序标识值进行修改的步骤包括:
根据已经安装的所述JAVA应用程序的个数和使用过的编号,为准备安装的JAVA应用程序指定一个不同的编号;
将所述安装文件副本中的应用程序名称参数添加编号后缀,其中所述编号后缀为所述指定的编号。
所述判断JAVA应用程序是否已经安装的步骤包括:
从所述JAVA应用程序的安装文件获取所述应用程序名称参数;
根据所述应用程序名称参数,判断是否有同名且同版本号的JAVA应用程序安装在本机,如果是,则判断出所述JAVA应用程序已经安装在本机。
具体地,所述JAVA应用程序的安装方法还包括:
在复制所述JAVA应用程序的安装文件的副本之前,通过显示信息提示用户选择是否进行影子实例的安装;
在判断JAVA应用程序是否已经安装之前,对所述JAVA程序的安装文件中的签名信息进行合法性校验,并在通过校验之后记录所述签名信息;并且,在利用修改后的安装文件副本进行所述JAVA应用程序的安装过程中,采用所述记录的签名信息。
本发明提供的终端设备包括JAVA应用程序安装模块,其用于判断JAVA应用程序是否已经安装,在已经安装所述JAVA应用程序时复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同,并且利用修改后的安装文件副本进行所述JAVA应用程序的安装;JAVA应用程序运行模块,其用于执行所述JAVA应用程序安装模块210安装的JAVA应用程序。
具体地,所述JAVA应用程序安装模块包括用于判断JAVA应用程序是否已经安装的判断子模块,其中所述判断子模块包括:
参数获取单元,用于从所述JAVA应用程序的安装文件获取作为所述JAVA应用程序标识值的应用程序名称参数;
判断单元,用于根据所述应用程序名称参数判断是否有“同名且同版本号”的JAVA应用程序安装在所述终端设备,如果是,则判断出所述JAVA应用程序已经安装在所述终端设备。
具体地,所述修改后的安装文件副本中的应用程序标识值为“参数值-编号”格式,其中参数值为所述JAVA应用程序的安装文件中的应用程序名称参数的值,所述编号为所述副本所对应的编号,并且所述JAVA应用程序安装模块还包括用于对所述安装文件的副本中的应用程序标识值进行修改的参数修改子模块,其中所述参数修改子模块包括:
查找单元,用于查找已经安装的所述JAVA应用程序的个数及使用过的编号,并根据已经安装的所述JAVA应用程序的个数和使用过的编号,为准备安装的JAVA应用程序指定一个不同的编号;
参数修改单元,用于将所述安装文件副本中的应用程序名称参数添加编号后缀,其中所述编号后缀为所述指定的编号
在本发明提供的方法和终端设备中,通过在JAVA应用程序的安装过程中修改作为该JAVA应用程序的标识值,以使其与已经安装的JAVA应用程序所对应的标识值不同,从而避开J2ME规范的技术限制,实现安装并运行一个新的应用程序实例,从而允许在同一台终端设备安装并运行多个运用程序示例,解决现有技术存在的无法在同一台设备上安装并运行多个应用程序实例的问题。
为让本发明的上述和其他目的、特征和优点能更明显易懂,下文特举一实施例,并配合所附图式,作详细说明如下。
【附图说明】
图1为本发明提供的JAVA应用程序的安装方法一种实施例的流程图;以及
图2为本发明提供的终端设备一种实施例的结构示意图。
【具体实施方式】
为解决现有技术存在的无法通过一个JAVA安装程序在同一台终端设备上安装并运行多个实例的的问题,本发明首先提供了一种JAVA应用程序的安装方法,其通过在对J2ME技术规范的安装过程进行扩展,在发现需要安装和运行重复应用程序实例的时候,自动制作原始安装文件的副本并对其中的相关参数进行自动修改,然后再按照原安装文件的权限属性进行新的应用程序实例的安装,从而实现在同一台终端设备上安装并运行多个应用程序实例。
J2ME规范要求一个JAVA应用程序,比如移动信息设备小程序(Mobile Information Devices applet, MIDlet)的唯一标识是该应用程序名称参数,即“MIDlet-Name”参数,其来自于JAVA应用程序的安装文件,且该参数通常采用明文字符串写在“.jad文件”,或者同时写在“.jar文件包”里的“.\META-INF\”目录内的MANIFEST.MF文件里。因此,本发明提供的实施例通过在JAVA应用程序的安装过程中改变上述参数值,从而避开J2ME规范的技术限制,实现安装并运行一个新的应用程序实例,为便于理解,以下将该新的应用程序实例称为影子实例。
请参阅图1,为本发明提供的JAVA应用程序的安装方法一种实施例的流程图。所述JAVA应用程序安装方法可以包括:
在JAVA应用程序的安装开始之后,首先执行步骤S1。
步骤S1,检查安装文件的签名信息。签名信息(即签名证书来源)可以决定该JAVA应用程序安装的合法性以及安装之后该JAVA应用程序在设备系统资源中进行应用的权限水平。该安装文件可以包括“.jar文件”和“.jad文件,在步骤S1中,如果“.jad文件”不存在或者“.jad文件”存在但没有签名信息,该JAVA应用程序在安装后被当作不被信任的程序对待;如果该安装文件的签名信息有错误,则停止安装;如果安装文件的签名信息正确,即该安装文件的签名信息通过J2ME的合法性校验原则,则可以继续安装转至步骤S2。
步骤S2,如果通过签名信息校验,记录该签名信息,包括签名的级别等,并转自步骤S3。
步骤S3,根据安装文件的“MIDlet-Name”参数的值,检查该JAVA应用程序是否已经在本机安装。在步骤S3中,首先可以对“.jad文件”进行解析,或者,对“.jar文件包”里的“.\META-INF\”目录内的MANIFEST.MF文件进行解析,以识别出该“.jad文件”或“.jar文件包”中的“MIDlet-Name”参数,并获取所述“MIDlet-Name”参数的值;
接着,根据所述“MIDlet-Name”参数的值,判断是否有“同名且同版本号”的JAVA应用程序已经安装在本设备中。如果没有,则转至步骤S9,按照J2ME规范的标准安装过程完成该JAVA应用程序的安装,具体安装过程可以参照J2ME规范的描述,以下不再赘述。如果存在“同名且同版本号”的JAVA应用程序已经安装在本设备中,则转至步骤S4。
步骤S4,如果该JAVA应用程序已经在本机安装,比如,如果在步骤S3中判断出存在“同名且同版本”的JAVA程序已经安装在本设备中,提示用户选择是覆盖现有安装实例还是进行影子实例的安装(即安装一个新的实例)。在具体实施例中,可通过显示信息提示用户通过操作系统进行选择。如果用户选择覆盖安装,则转至步骤S9,按照J2ME规范的标准安装过程完成该JAVA应用程序的安装。如果用户选择进行影子实例的安装,则转自步骤S5。
步骤S5,如果用户选择进行影子实例的安装,则复制一个安装文件的副本。在具体实施例中,如果用户通过系统的信息提示选择进行影子实例的安装,系统将接收到相应的操作指令,在这种情况下,可以在内存或文件系统进行安装文件副本的复制,即在该内存或文件系统中拷贝“.jar文件”和“.jad文件”,并转自步骤S6。
步骤S6,修改安装文件副本中的“MIDlet-Name”参数的值,以使该副本中的“MIDlet-Name”参数的值与已经安装的实例所对应的“MIDlet-Name”参数的值不同。比如,在一种实施例中,步骤S6可以包括以下子步骤:
首先,查找已经安装的影子实例的个数以及所述影子实例使用过的编号;
接着,根据已经安装的影子实例的个数和使用过的编号,为准备安装的新的影子实例指定一个不同的编号,比如,可以将已经使用过的最大编号加1,作为准备进行安装的新的影子实例的编号,或者,该指定的编号也可作为该安装文件副本的编号;
然后,将该安装文件副本中的“MIDlet-Name”参数添加编号后缀,即将该副本中的“MIDlet-Name”参数替换为“参数值-编号”,由此,每个影子实例的“MIDlet-Name”参数的值各不相同,其分别为N-1、N-2、N-3等,其中N表示原安装文件中的“MIDlet-Name”参数的值。
步骤S7,利用修改后的安装文件副本进行JAVA应用程序的安装。由于在该修改后的安装文件副本中,作为该JAVA应用程序唯一标识的“MIDlet-Name”参数的值已经被修改成与已经安装的应用实例所对应的“MIDlet-Name”参数值不同,因此可以避开J2ME规范的技术限制,从而在不违背J2ME规范的前提下,实现安装并运行一个新的实例。另外,在步骤S7的安装过程中,不需要再次校验签名的有效性,而在安装过程采用已经记录的签名进行。
步骤S8,向用户显示该JAVA应用程序安装的结果,并在完成安装之后删除上述使用过的安装文件副本,以释放存储空间。
在本发明上述实施例提供的JAVA应用程序的安装方法中,通过在JAVA应用程序的安装过程中修改作为该JAVA应用程序唯一标识的“MIDlet-Name”参数的值,从而避开J2ME规范的技术限制,实现安装并运行一个新的实例,从而解决现有技术存在的问题。
基于上述JAVA应用程序的安装方法,本发明还进一步提供一种终端设备。请参阅图2,其为本发明提供的终端设备一种实施例的结构示意图。所述终端设备可以为移动终端设备,其可采用上述JAVA应用程序的安装方法进行JAVA应用程序的安装,并且,所述终端设备可以包括:
JAVA应用程序安装模块210,其用于判断JAVA应用程序是否已经安装在所述终端设备200,在已经安装所述JAVA应用程序时复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同,并且利用修改后的安装文件副本进行所述JAVA应用程序的安装;
JAVA应用程序执行模块220,其用于执行所述JAVA应用程序安装模块210安装的JAVA应用程序。
其中,所述JAVA应用程序安装模块210可以包括:
判断子模块211,用于判断所述JAVA应用程序是否已经安装在所述终端设备200;
复制子模块212,用于在判断子模块211判断出所述终端设备200已经安装所述JAVA应用程序时复制所述JAVA应用程序的安装文件的副本;
参数修改子模块213,用于对所述复制子模块212提供的安装文件的副本中的应用程序标识值进行修改;
程序安装子模块214,用于利用修改后的安装文件副本在所述终端设备200中进行所述JAVA应用程序的安装。
在一种实施例中,所述判断子模块211可以包括:
参数获取单元201,用于从所述JAVA应用程序的安装文件获取作为所述JAVA应用程序标识值的“MIDlet-Name”参数;
判断单元202,用于根据所述“MIDlet-Name”参数判断是否有“同名且同版本号”的JAVA应用程序安装在所述终端设备,如果是,则判断出所述JAVA应用程序已经安装在所述终端设备;
在一种实施例中,所述参数修改子模块213可以包括:
查找单元203,用于查找已经安装的所述JAVA应用程序的个数及使用过的编号,并根据已经安装的所述JAVA应用程序的个数和使用过的编号,为准备安装的JAVA应用程序指定一个不同的编号;
参数修改单元204,用于将所述安装文件副本中的“MIDlet-Name”参数添加编号后缀,其中所述编号后缀为所述指定的编号。
应当理解,图2所示的各个功能模块和功能单元均可以为软件模块,其可以在所述终端设备200内部的处理器实现,以执行上述JAVA应用程序的安装方法。并且,除了图2所示的模块或功能单元之外,所述终端设备200还可以具有其他功能模块或功能单元来实现上述JAVA应用程序的安装方法中其他步骤。另外,图2所示的功能模块或功能单元所执行的具体功能可以参照述JAVA应用程序的安装方法的相关步骤的技术细节,并且图2所示的功能模块还可能具有用于实现所述技术细节的其他子模块或者功能单元。
虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明,任何熟悉本专业的技术人员,在不脱离本发明技术方案范围内,当可利用上述揭示的技术内容作出些许更动或修饰为等同变化的等效实施例,但凡是未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所作的任何简单修改、等同变化与修饰,均仍属于本发明技术方案的范围内。

Claims (10)

  1. 一种JAVA应用程序的安装方法,其特征在于,包括:
    判断JAVA应用程序是否已经安装;
    如果已经安装所述JAVA应用程序,复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同;
    利用修改后的安装文件副本进行所述JAVA应用程序的安装。
  2. 根据权利要求1所述的方法,其特征在于,所述应用程序标识值为所述安装文件中用于对所述JAVA应用程序进行唯一标识的应用程序名称参数的值。
  3. 根据权利要求2所述的方法,其特征在于,所述修改后的副本中的应用程序标识值为“参数值-编号”格式,其中参数值为所述JAVA应用程序的安装文件中的应用程序名称参数的值,所述编号为所述副本所对应的编号。
  4. 根据权利要求3所述的方法,其特征在于,所述对安装文件的副本中的应用程序标识值进行修改的步骤包括:
    根据已经安装的所述JAVA应用程序的个数和使用过的编号,为准备安装的JAVA应用程序指定一个不同的编号;
    将所述安装文件副本中的应用程序名称参数添加编号后缀,其中所述编号后缀为所述指定的编号。
  5. 根据权利要求2所述的方法,其特征在于,所述判断JAVA应用程序是否已经安装的步骤包括:
    从所述JAVA应用程序的安装文件获取所述应用程序名称参数;
    根据所述应用程序名称参数,判断是否有同名且同版本号的JAVA应用程序安装在本机,如果是,则判断出所述JAVA应用程序已经安装在本机。
  6. 根据权利要求1所述的方法,其特征在于,还包括:在复制所述JAVA应用程序的安装文件的副本之前,通过显示信息提示用户选择是否进行影子实例的安装。
  7. 根据权利要求1所述的方法,其特征在于,还包括:在判断JAVA应用程序是否已经安装之前,对所述JAVA程序的安装文件中的签名信息进行合法性校验,并在通过校验之后记录所述签名信息;并且,在利用修改后的安装文件副本进行所述JAVA应用程序的安装过程中,采用所述记录的签名信息。
  8. 一种终端设备,其特征在于,包括:
    JAVA应用程序安装模块,其用于判断JAVA应用程序是否已经安装,在已经安装所述JAVA应用程序时复制所述JAVA应用程序的安装文件的副本,并对所述安装文件的副本中的应用程序标识值进行修改,以使其与已经安装的JAVA应用程序所对应的标识值不同,并且利用修改后的安装文件副本进行所述JAVA应用程序的安装;
    JAVA应用程序运行模块,其用于执行所述JAVA应用程序安装模块安装的JAVA应用程序。
  9. 根据权利要求8所述的终端设备,其特征在于,所述JAVA应用程序安装模块包括用于判断JAVA应用程序是否已经安装的判断子模块,所述判断子模块包括:
    参数获取单元,用于从所述JAVA应用程序的安装文件获取作为所述JAVA应用程序标识值的应用程序名称参数;
    判断单元,用于根据所述应用程序名称参数判断是否有“同名且同版本号”的JAVA应用程序安装在所述终端设备,如果是,则判断出所述JAVA应用程序已经安装在所述终端设备。
  10. 根据权利要求9所述的终端设备,其特征在于,所述修改后的安装文件副本中的应用程序标识值为“参数值-编号”格式,其中参数值为所述JAVA应用程序的安装文件中的应用程序名称参数的值,所述编号为所述副本所对应的编号,并且所述JAVA应用程序安装模块还包括用于对所述安装文件的副本中的应用程序标识值进行修改的参数修改子模块,所述参数修改子模块包括:
    查找单元,用于查找已经安装的所述JAVA应用程序的个数及使用过的编号,并根据已经安装的所述JAVA应用程序的个数和使用过的编号,为准备安装的JAVA应用程序指定一个不同的编号;
    参数修改单元,用于将所述安装文件副本中的应用程序名称参数添加编号后缀,其中所述编号后缀为所述指定的编号。
PCT/CN2012/070965 2011-02-10 2012-02-08 Java应用程序的安装方法和终端设备 WO2012106989A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011100356544A CN102103510A (zh) 2011-02-10 2011-02-10 Java应用程序的安装方法和终端设备
CN201110035654.4 2011-02-10

Publications (1)

Publication Number Publication Date
WO2012106989A1 true WO2012106989A1 (zh) 2012-08-16

Family

ID=44156303

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/070965 WO2012106989A1 (zh) 2011-02-10 2012-02-08 Java应用程序的安装方法和终端设备

Country Status (2)

Country Link
CN (1) CN102103510A (zh)
WO (1) WO2012106989A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103510A (zh) * 2011-02-10 2011-06-22 惠州Tcl移动通信有限公司 Java应用程序的安装方法和终端设备
CN105224322B (zh) * 2015-09-25 2018-10-16 维沃移动通信有限公司 一种应用程序的分身方法及终端
CN106203167B (zh) * 2016-07-08 2019-05-07 北京小米移动软件有限公司 应用权限管理方法及装置
CN106445594B (zh) * 2016-09-23 2020-08-28 海信集团有限公司 系统应用的安装方法、装置和终端设备
CN106650324A (zh) * 2016-10-10 2017-05-10 广东欧珀移动通信有限公司 应用程序的权限管理方法、装置及移动终端
CN106484480A (zh) * 2016-10-10 2017-03-08 广东欧珀移动通信有限公司 一种分身应用的确定方法、装置及终端
CN106485135A (zh) * 2016-10-10 2017-03-08 广东欧珀移动通信有限公司 应用程序的权限控制方法、装置及移动终端
CN106650402B (zh) * 2016-10-10 2019-07-12 Oppo广东移动通信有限公司 应用程序的权限配置方法、装置及移动终端
CN106484420A (zh) * 2016-10-10 2017-03-08 广东欧珀移动通信有限公司 一种应用程序的控制方法、装置及智能终端
CN106650403B (zh) * 2016-10-10 2019-08-06 Oppo广东移动通信有限公司 一种多开应用的权限管理方法、装置及智能终端
CN106485136A (zh) * 2016-10-10 2017-03-08 广东欧珀移动通信有限公司 应用程序的权限配置方法、装置及移动终端

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727560A (zh) * 2009-12-03 2010-06-09 深圳华为通信技术有限公司 对java程序增强保护的方法和设备及移动终端
CN101827319A (zh) * 2009-01-26 2010-09-08 株式会社Ntt都科摩 安装通知方法、安装通知系统以及安装通知服务器
CN101836186A (zh) * 2007-10-20 2010-09-15 思杰系统有限公司 用于在隔离环境之间通信的方法和系统
CN102103510A (zh) * 2011-02-10 2011-06-22 惠州Tcl移动通信有限公司 Java应用程序的安装方法和终端设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1870804A1 (en) * 2006-06-22 2007-12-26 Microsoft Corporation Dynamic software localization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101836186A (zh) * 2007-10-20 2010-09-15 思杰系统有限公司 用于在隔离环境之间通信的方法和系统
CN101827319A (zh) * 2009-01-26 2010-09-08 株式会社Ntt都科摩 安装通知方法、安装通知系统以及安装通知服务器
CN101727560A (zh) * 2009-12-03 2010-06-09 深圳华为通信技术有限公司 对java程序增强保护的方法和设备及移动终端
CN102103510A (zh) * 2011-02-10 2011-06-22 惠州Tcl移动通信有限公司 Java应用程序的安装方法和终端设备

Also Published As

Publication number Publication date
CN102103510A (zh) 2011-06-22

Similar Documents

Publication Publication Date Title
WO2012106989A1 (zh) Java应用程序的安装方法和终端设备
CN111680274B (zh) 资源访问方法、装置及设备
US9614834B2 (en) Permission management method, apparatus, and terminal
TWI502504B (zh) 用以管理軟體版本之方法、裝置、與電腦程式產品
US8601599B2 (en) Platform security apparatus and method thereof
WO2014092511A1 (en) Method and apparatus for protecting an application program
WO2010068073A2 (ko) 장치식별정보를 이용한 서비스 제공 방법, 그 장치 및 그 프로그램을 기록한 컴퓨터 판독 가능한 기록매체
WO2016036115A1 (ko) 재등록을 관리하는 전자 장치 및 방법
KR101252921B1 (ko) 사업자에게 부여된 자격들에 기초하여 장치 내의 소프트웨어 코드의 실행을 인가하는 시스템 및 방법
WO2016169390A1 (zh) 应用安全防护方法、终端、存储介质
WO2017122980A1 (en) Electronic device and method for authenticating identification information thereof
CN104573435A (zh) 用于终端权限管理的方法和终端
KR20200046080A (ko) 어플리케이션 증명서
EP3850521A1 (en) Electronic apparatus managing data based on block chain and method for managing data
US20230004371A1 (en) Package distribution and installation in response to user logon
WO2014150753A2 (en) Method and system for restricting the operation of applications to authorized domains
WO2014150737A2 (en) Method and system for enabling the federation of unrelated applications
WO2018053903A1 (zh) 文件管理方法、文件管理装置及移动终端
WO2012109985A1 (zh) 基于java的移动终端鉴权系统和方法、服务器及终端
WO2018101797A1 (en) Automatic self-activation of universal integrated circuit card
US20220051678A1 (en) Staged user enrollment using audio devices
WO2020045826A1 (ko) 디지털 키를 처리하는 전자 디바이스 및 그 동작 방법
CN104969176B (zh) 一种管理应用对证书和密钥的访问的方法、设备及介质
US20140075456A1 (en) Information processing apparatus and method for controlling information processing apparatus
WO2014129810A1 (en) Method and electronic device for sending and receiving data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12744171

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12744171

Country of ref document: EP

Kind code of ref document: A1