The present invention relates generally to data processing systems and relates specifically to migrating missing files using a help dialog box of a software debugger.
Software developers migrate computer applications from a first environment to a second environment in the normal course of their work. For example, when software developers complete a new computer application, they must migrate the new computer application from a development environment to a work environment where the application can be used by others. In another example, existing applications are migrated from a first environment on an old server or computer running an old operating system to a second environment on new server or a computer running new operating system. Even when a computer application runs properly in a first environment, errors may occur when running the computer application in a second environment.
In order to prevent errors, software developers test, or “debug,” the computer application in the second computer environment to verify that the computer application runs properly in the second environment. To test the computer application in the second environment, software developers use a debugger. Debuggers run each line of code in the computer application in sequence, one line of code at a time, to identify any errors that may occur for each line of code. Debuggers often employ a feature called a help dialog box to assist in the debugging process. A help dialog box contains additional information about an element on a computer display in response to the user performing a predefined action related to the element. For example, a help dialog box may open when a user right clicks on the element, or selects “help” from a menu when the element is highlighted. In another example, “Hover help” is a help dialog box that opens when a user places a mouse cursor over the element. U.S. Patent. App. No. 2005/0114778 A1 discloses hover help for displaying information in response to a mouse cursor positioned over a feature on a computer display. In the context of a debugger, hover help displays information about a line of code when the developer places a mouse cursor over the line of code. A debugger's help dialog box information may describe the usage of a command in the line of code, the types of arguments that can be used with the command, and the types of responses that can be generated by the command.
JAVA is a programming language used by software developers to create computer applications. JAVA computer applications are often made up of several partial computer applications called “Applets.” Each Applet used by a JAVA computer application can be stored and run from separate physical or logical locations. For example, an Applet on a server computer and an Applet on a client computer can run together as part of a single JAVA computer application. Because portions of a JAVA computer application can be run on separate computers, the JAVA programming language is particularly well suited for internet based computer applications used on the World Wide Web.
In order to run Applets located on different computers together in a single JAVA computer application, the JAVA programming language employs a structure for defining and locating each Applet used by a JAVA computer application. The structure employs “classpaths” and import statements to tell a JAVA compiler where to locate Applets used by a JAVA computer application. A classpath is a JAVA environment variable that tells a JAVA compiler where to find one or more “class files.” A “class file” is a complied JAVA source code for a JAVA computer application or Applet, using a precisely defined file format. Class files are stored in a “JAR file” (JAR is an abbreviation of “JAVA Archive”) bundled with associated auxiliary resources containing everything needed for a single JAVA computer application or Applet to run. JAVA compilers use an “import statement” to locate related resources and class files using a fully qualified class name. Alternatively, software developers can define a set of import statements to list each individual resource and class file related to a common classpath. Software developers must be careful to ensure that the classpath and import statements are correct, or else the JAVA computer application will not be able to locate JAR files containing the class files for the Applets that make up the JAVA computer application.
When migrating JAVA computer applications from a first environment to a second environment, software developers encounter three common errors. Either a classpath is not set up properly for the second environment, contents are missing from a required JAR file, or a required JAR file is missing. With any of these errors, the JAVA computer application cannot locate the required JAR file or JAR file contents. If the classpath is not set up correctly, the JAVA compiler will not look for class files in the correct location. If some of contents of the required JAR file are missing, such as an instruction set or resource, the JAVA compiler will not be able to locate or run the required JAR file contents. If the required JAR file containing the class file was not copied to the second environment, or if the required JAR file was not copied to the proper directory in the second environment, then the JAVA compiler will not be able to locate the required JAR file.
U.S. patent application Ser. No. ______ (Attorney Docket number AUS90060763US1) disclose a Classpath Identifier help dialog box plug-in that obtains the classpath for a selected line of code from the JAVA compiler and displays the current classpath when using a JAVA debugger. (The classpath is identified by the JAVA compiler as part of the compiling process prior to debugging the JAVA computer application.) Additionally, the Classpath Identifier displays the name and location of the JAR file containing the line of code. Although the Classpath Identifier helps developers quickly identify and correct errors when a JAVA computer application works in a first environment but not in a second environment, a need exists for a way to automatically copy a JAR file from the first environment to the second environment when a required JAR file in the second environment is missing or the required JAR file in the second environment is missing a component.
A “File Updater” adds an additional feature to the Classpath Identifier help dialog box plug-in that displays a JAR file in a first environment, and automatically copies the JAR file from the first environment to a second environment whenever a required JAR file is missing in the second environment, or whenever the required JAR file in the second environment is missing a component.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will be understood best by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
The principles of the present invention are applicable to a variety of computer hardware and software configurations. The term “environment,” “computer hardware,” or “hardware,” as used herein, refers to any machine or apparatus that is capable of accepting, performing logic operations on, storing, or displaying data, and includes without limitation processors and memory. An “environment” may refer to a physical or logical partition of computer hardware. The term “computer software” or “software,” refers to any set of instructions operable to cause computer hardware to perform an operation. A “computer,” as that term is used herein, includes without limitation any useful combination of hardware and software, and a “computer program” or “program” includes without limitation any software operable to cause computer hardware to accept, perform logic operations on, store, or display data. A computer program may, and often is, comprised of a plurality of smaller programming units, including without limitation subroutines, modules, functions, methods, and procedures. Thus, the functions of the present invention may be distributed among a plurality of computers and computer programs. The invention is described best, though, as a single computer program on a second environment that configures and enables one or more general-purpose computers to implement the novel aspects of the invention, including copying files from a first environment to the second environment. For illustrative purposes, the inventive computer program will be referred to as the “File Updater.”
Additionally, the File Updater is described below with reference to an exemplary network of hardware devices, as depicted in
File Updater 200 typically is stored in a memory in a second environment, represented schematically as memory 220 in
Memory 221 is located in a first environment. Memory 221 may include original JAR file A 290, original JAR file B 292, original JAR file C 294, original JAR file D 296. In a preferred embodiment, a developer has already migrated source code 250 from the first environment shown by memory 221 to the second environment shown by memory 220. The developer uses File Updater 200 when running JAVA debugger 230 to verify that source code 250 operates properly in the second environment.
Hover help plug-in 300, shown in
Migration component 400, as shown in
A preferred form of the invention has been shown in the drawings and described above, but variations in the preferred form will be apparent to those skilled in the art. One skilled in the art will see that the File Updater can be applied to the migration of many different types of applications from a first environment to a second environment using any IDE (Integration Developer Environment). In addition to JAVA applets, the File Updater can by used with servlets, weblets, and non-JAVA based applications and sub-applications. Further, File Updater Identifier can be used with any help dialog box implementation known in the art, not just hover help. The preceding description is for illustration purposes only, and the invention should not be construed as limited to the specific form shown and described. The scope of the invention should be limited only by the language of the following claims.
The present invention is related to the subject matter of U.S. patent application Ser. No. ______ (Attorney Docket number AUS90060763US1), incorporated herein by reference.