JP2003150405A - Debug method for equipment incorporating program - Google Patents

Debug method for equipment incorporating program

Info

Publication number
JP2003150405A
JP2003150405A JP2001343047A JP2001343047A JP2003150405A JP 2003150405 A JP2003150405 A JP 2003150405A JP 2001343047 A JP2001343047 A JP 2001343047A JP 2001343047 A JP2001343047 A JP 2001343047A JP 2003150405 A JP2003150405 A JP 2003150405A
Authority
JP
Japan
Prior art keywords
class
class object
host computer
program
java
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
JP2001343047A
Other languages
Japanese (ja)
Inventor
Toyohiko Ushiku
豊彦 牛久
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2001343047A priority Critical patent/JP2003150405A/en
Publication of JP2003150405A publication Critical patent/JP2003150405A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a debug method for equipment incorporating program capable of suppressing API disclosed to the outside to the minimum extent and ensuring security. SOLUTION: When debugging a program executed by object directivity language represented by Java and incorporated in equipment and codes not depending on type of machine on a host computer through a network, a debug method is provided with a mounted class object acquisition means for acquiring a mounted class object executed in a subclass of a specific class and suitable for the environment, a remote proxy means for generating and deleting each class object on equipment instead of a program executed on the host computer and calling a method of class object, and a remote method transmission means for transmitting the operation performed for itself by class object acquired by the mounted class object acquisition means on the host computer to the remote proxy means as it is.

Description

【発明の詳細な説明】 【0001】 【発明の属する技術分野】本発明は、Java言語プログラ
ムに代表される仮想マシン上で実行されるプログラム言
語を機器制御に用いる装置に組み込むべきプログラムを
デバッグする方法に関する。 【0002】 【従来の技術】プリンタ、コピア、FAX等のオフィス
機器、冷蔵庫、電話機、電子レンジ等の家庭用機器等の
装置にマイクロプロセッサを搭載し、マイクロプロセッ
サによって実行されるプログラムにより装置を制御する
ことが一般的に行われている。これらの装置内のマイク
ロプロセッサによって実行されるプログラムを機器組込
みソフトウェアと呼ぶ。 【0003】近年、マイクロプロセッサの高性能化、メ
モリ、ハードディスク等の記憶装置の大容量化、低価格
化等によって、とりわけオフィス機器において、機器組
込みソフトウェアの高機能化と大規模化が行われてい
る。機器組込みソフトウェアの高機能化と大規模化に伴
い、ソフトウェア開発の複雑化、開発期間の長期化の傾
向が見られるようになってきた。特に、これらの機器で
は使用されるマイクロプロセッサや機器制御を行うため
のリアルタイムOS等は、同じシリーズの製品でもコス
トの問題等の諸々の事情により変更されることがあり、
そのため前の製品で動いたプログラムが後から開発され
る製品では動かなくなってしまい、最初から作り直さね
ばならなくなってしまうことが多い。このことが危機組
込みソフトウェアの生産性を著しく悪化させる要因とな
っている。 【0004】一方、コンピュータの分野でも、プロセッ
サのアーキテクチャや稼動しているOS毎にソフトウェ
アを開発しなければならないことに変わりはない。その
ため、種々雑多なコンピュータが接続されているネット
ワーク全体で同じソフトウェアを使用したい場合、プロ
セッサアーキテクチャとOS、機器構成等の組み合わせ
全部に対して個別にソフトウェアを開発、維持管理しな
ければならない。そのため、プロセッサアーキテクチ
ャ、OSや機器構成等に依存することなく、全てのコン
ピュータ上において全く同じプログラムを実行可能とす
るJava言語が開発され、使用されるようになってきた。 【0005】前記組込みソフトウェアの生産性の問題を
解決するためにコンピュータ用に開発されたこのJava言
語を機器組込みソフトウェアに使うことが多くなってき
ている。Javaにおいては、ソースプログラムはバイトコ
ードと呼ばれる仮想マシンのコードに翻訳され、各々の
コンピュータ上に実現された仮想マシンの上でバイトコ
ードが解釈・実行されることにより、同じプログラムを
異なるアーキテクチャのプロセッサ上で実行可能にして
いる。 【0006】又、標準API(Application Programmin
g lnterface )が用意され、OSの持つ機能が抽象化さ
れており、標準APIを使用している限りは直接OSや
その上で動くミドルウェアの機能を直接呼び出す必要は
ない。そのため、標準APIを使えば機器に組み込んで
実行するJavaプログラムをそのままコンピュータ上で動
かすことができるようになる。このことにより、コンピ
ュータ用のJavaプログラム開発ツールを使用し、コーデ
ィングからテスト・デバッグまでの機器組込みプログラ
ムの開発をコンピュータ上で行うことができる。 【0007】しかしながら、オフィス機器等はコンピュ
ータとは異なった特有の機能を持っている場合が多い。
それらの機能を使用するためのJavaプログラムを構築す
るためには、それらの機能用のJava APIが提供される必
要がある。これらのAPIの内部では機器の特有機能を
使用するためにJava以外で記述された既存のプログラム
モジュールを呼び出す形で実現されるのが普通である。
この機器特有機能を使用するJavaプログラムをコンピュ
ータ上で実行するためには、これら機能を使用するため
のJava APIをコンピュータ上に構築しなければならな
い。 【0008】しかし、機器上の機器の特有機能を使用す
るための既存プログラムモジュールはコンピュータ上で
は実行できないため、機器用に作られたJava APIをコン
ピュータ上で実行することはできない。そのため、次の
2つの方法を採るのが一般的である。 【0009】1)機器の特有機能をコンピュータ上でシ
ミュレートする。機器の持つ機能をコンピュータ上でシ
ミュレートするソフトウェアを開発しJava APIから利用
する。 【0010】2)機器特有の機能のプログラムモジュー
ルに機器外部からアクセスする機器特有機能のプログラ
ムモジュールを機器外部からもアクセス可能に修正し、
コンピュータ上のJava API内部で機器のプログラムモジ
ュールをアクセスする。 【0011】 【発明が解決しようとする課題】前記2つの方法には次
の問題が存在する。 【0012】先ず、1)の方法では、機器特有の機能の
大部分はハードウェアによって実現されていることが多
く、コンピュータ上でハードウェアのシミュレーション
を行わなければならない。一般にハードウェアのシミュ
レートはコンピュータ資源を多く必要とするため、シミ
ュレートを行うコンピュータには高性能なものが要求さ
れる。 【0013】又、2)の方法では、本来外部に公開しな
いものを公開しなければならないため、公開するための
プログラムや、外部からの不正使用を防止するためのプ
ログラム等を開発しなければならず、プログラム規模の
増大を招くという問題が存在する。 【0014】本発明は上記問題に鑑みてなされたもの
で、その目的とする処は、開発に多大な労力の必要で、
実行する際にも資源を多く必要とする機器のシミュレー
タをホストコンピュータ上に準備する必要もなく、外部
に公開するAPIを最小限にしてセキュリティを確保す
ることができる機器組込みプログラムのデバッグ方法を
提供することにある。 【0015】 【課題を解決するための手段】上記目的を達成するた
め、本発明は、機器に組み込まれJavaに代表されるオブ
ジェクト指向言語で且つ機種非依存なコードにより実行
されるプログラムをネットワークを通じてホストコンピ
ュータ上でデバッグする場合、特定のクラスのサブクラ
スで実行される環境に合った実装クラスオブジェクトを
取得する実装クラスオブジェクト取得手段と、ホストコ
ンピュータ上で実行されるプログラムの代わりに機器上
で各クラスオブジェクトの生成・削除、クラスオブジェ
クトのメソッド呼び出し等を行うリモートプロキシ手段
を有し、ホストコンピュータ上で前記実装クラスオブジ
ェクト取得手段によって取得されたクラスオブジェクト
が自分自身に行われる操作をそのまま前記リモートプロ
キシ手段に対して伝えるリモートメソッド伝達手段を備
えるように構成することによって行うことを特徴とす
る。 【0016】 【発明の実施の形態】以下に本発明の実施の形態を添付
図面に基づいて説明する。 【0017】尚、本実施の形態はJavaの標準クラスライ
ブラリであるRMI(Remote Method Invocation)を使
用して実施している。 【0018】図1は本発明方法を実施するための機器の
構成を示すブロック図であり、同図において、110は
ホストコンピュータであり、このホストコンピュータ1
10は、CPU111、ROM112、RAM113、
ネットワーク・デバイス114、ハードディスク11
5、バス116、入出力デバイス117から成る。CP
U111は、ホストコンピュータ110全体の制御及び
データ演算を行う。ROM112は、ホストコンピュー
タ110の制御プログラム、初期データ等を格納する。
RAM113は情報処理の一時的な記憶領域を提供す
る。ネットワーク・デバイス114は外部の装置とのデ
ータ送受信を行う。ハードディスク115は各種プログ
ラム、データ等を永続的に格納する。入出力デバイス1
17は、データの入出力や操作指示等を行うデバイスで
ある。バス116は以上の各部を接続し、ホストコンピ
ュータ110内部において各種データの伝達を行う。 【0019】120はプリンタ等のオフィス機器であ
り、このオフィス機器120は、CPU121、ROM
122、RAM123、ネットワーク・デバイス12
4、特殊デバイス125、バス126から成る。CPU
121は、オフィス機器120全体の制御及びデータ演
算を行う。ROM122は、オフィス機器120の制御
プログラム、初期データ等を格納する。RAM123は
情報処理の一時的な記憶領域を提供する。ネットワーク
・デバイス124は外部の装置とのデータ送受信を行
う。特殊デバイス125はオフィス機器120の持つ特
殊機能を実現しているデバイスで、オフィス機器120
がプリンタである場合は紙への印刷を行うプリント・エ
ンジンに当たる。バス126は以上の各部を接続し、オ
フィス機器120内部において各種データの伝達を行
う。 【0020】又、図2はオフィス機器120上で実行さ
れるプログラムの構成を階層として表現した図であり、
上位層は下位層のプログラムを呼び出すことにより機能
を実現していることを表している。 【0021】図2において、201は図1のオフィス機
器120で構成が示されているハードウェア、202は
ハードウェア201の制御やプログラムの実行制御を行
うオペレーティングシステム、203はバイトコードを
解釈・実行する仮想マシン、204は良く使う処理を汎
用ライブラリとしてまとめJavaクラスで構成されたJava
APIライブラリ、205はJava APIライブラリ204内
でJavaと、Java以外で記述されたルーチンとの間を繋ぐ
ためのネイティブ・アクセス・レイヤ、206はネイテ
ィブ・アクセス・レイヤ205からアクセスされるJava
以外の言語で記述されたルーチン群であるネイティブ・
ライブラリ、207はJava APIライブラリ204を呼び
出すことにより各種処理を行うJavaで記述されたアプリ
ケーションである。 【0022】更に、図3はJavaアプリケーション207
をホストコンピュータ110で実行し、デバッグする際
のオフィス機器120及びホストコンピュータ110上
で実行されるソフトウェアの構成を階層として表現した
図である。同図において、311はホストコンピュータ
110のハードウェアであり、312はホストコンピュ
ータ110のオペレーティングシステム、313はホス
トコンピュータ110のJava仮想マシン、314はホス
トコンピュータ110のJava APIライブラリ、315は
ホストコンピュータのネイティブ・アクセス・レイヤ、
316はオフィス機器120上でJavaアプリケーション
207の代理として実行されるRMIスケルトンであ
る。201〜207は図2と同じものを表している。 【0023】図4〜図13はJavaプログラムの例を示す
図であり、図4は各クラスの継承図、図5はRMIToolkit
クラスのソースコード・リスト、図6はPrinter クラス
のソースコード・リスト、図7はRMIToolkitクラスのサ
ブクラスであるTRMIToolkitクラスのソースコード・リ
スト、図8はPrinter クラスのサブクラスであるTprint
erクラスのソースコード・リスト、図9はRMIToolkitク
ラスのサブクラスであるHRMIToolkit クラスのソースコ
ード・リスト、図10はPrinter クラスのサブクラスで
あるHPrinterクラスのソースコード・リスト、図11は
RMI のリモートアクセスのためのインタフェースである
Remoteインタフェースを継承したRPrinterインタフェー
スのソースコード・リスト、図12はRMI のリモートメ
ソッド呼び出しのためのクラスであるUnicastRemote0bj
ect クラスのサブクラスで、RPrinterインタフェースを
実装しているPrintServer クラスのソースコード・リス
ト、図13はデバッグ対象となるユーザアプリケーショ
ンのソースコード・リストである。 【0024】以上の図を用いて本実施の形態を説明す
る。 【0025】先ず、ユーザアプリケーションをオフィス
機器120上で実行する際の動作について説明する。こ
こで、ユーザアプリケーションとして、オフィス機器と
してプリンタを想定し、プリンタの各種属性値を文字列
のリストとして得るような機能を想定する。 【0026】ユーザアプリケーションがオフィス機器で
実行されるとき、オフィス器機内にはJava API204と
しRMIToolkit、Printer 、TRMIToolkit の各クラス、NA
L 205としてTPrinterクラスはライブラリとして存在
している。又、ネイティブライブラリ206には、TPri
nterクラスから呼び出されるネイティブメソッドルーチ
ンが存在している。ユーザアプリケーションは、図14
で示すようなユーザインタフェースを持ち、ボタンが押
されるとプリンタの属性リストを表示するように構成さ
れている。ボタンが押されると図13のユーザプログラ
ムを構成するTestApp クラスのactionPerformed メソッ
ドが呼び出される。その中で、409で示す部分でPrin
ter クラスオブジェクトを取得し、そのPrinter クラス
オブジェクトのgetAttributeメソッドを呼び出すことに
よって属性リストを取得している。Printer クラスオブ
ジェクトは、以下のようにして取得する。 【0027】先ず、RMIToolkitクラスに対してgetDefau
ltToolkit メソッドを呼び出すことによって、現在実行
している環境で標準値として使用されるRMIToolkitクラ
スオブジェクトを取得する。RMIToolk tクラスではgetD
efaultToolkit メソッドでは、図5の401に示すよう
にシステムプロパティとして定義されているRMIToolkit
クラスの実装クラスを捜してそのクラスのオブジェクト
を生成し、リターン値として返す。オフィス機器のJava
仮想マシン203はRMIToolkitの実装クラスとしてTRMI
Toolkit クラスを使用するようシステムプロパティが設
定されているため、getDefaultToolkit のリターン値と
してTRMIToolkit クラスオブジェクトが返される。TRMI
Toolkit クラスオブジェクトのgetPrinterメソッドは、
図7の403に示すようにTPrinterクラスオブジェクト
を返すようになっている。このようにしてPrinter クラ
スの実装オブジェクトとしてTprinterクラスオブジェク
トが取得できる。 【0028】図8の404に示すようにTPrinterのgetA
ttributeメソッドは、ネイティブメソッドであるgetAtt
rib を呼び出し、getAttrib はプリンタの属性を管理し
ているルーチンから属性値を取得する。 【0029】次に、ユーザアプリケーションをホストコ
ンピュータ120上で実行する際の動作について説明す
る。 【0030】ユーザアプリケーションがホストコンピュ
ータで実行されるとき、オフィス器機内にはJava API2
04としRMIToolkit、Printer 、TRMIToolkit の各クラ
ス、NAL 205としてTPrinterクラスがライブラリとし
て存在している。又、ネイティブライブラリ206に
は、TPrinterクラスから呼び出されるネイティブメソッ
ドルーチンが存在している。更に、RMI 用に図11に示
すインタフェースを持つRMI クラスPrintServer クラス
が実行されており、RMI のrmiregistry コマンドにより
PrintServer クラスがprintersaverとしてネットワーク
に対して登録されている。勿論、PrintServer クラスの
スタブ、テンプレートもオフィス機器120内に用意さ
れている。 【0031】又、ホストコンピュータ110には、Java
API314としRMIToolkit、Printer 、HRMIToolkit の
各クラス、NAL 315としてHPrinterクラスがライブラ
リとして存在している。 【0032】ユーザアプリケーションのボタンが押され
ると図13のユーザプログラムを構成するTestApp クラ
スのactionPerformed メソッドが呼び出される。その中
で、409で示す部分でPrinter クラスオブジェクトを
取得し、そのPrinter クラスオブジェクトのgetAttribu
teメソッドを呼び出すことによって属性リストを取得し
ている。 【0033】ホストコンピュータ110用のPrinter ク
ラスオブジェクトは以下のようにして取得する。 【0034】先ず、RMIToolkitクラスに対してgetDefau
ltToolkit メソッドを呼び出すことによって、ホストコ
ンピュータの環境で標準値として使用されるRMIToolkit
クラスオブジェクトを取得する。RMIToolkitクラスでは
getDefaultToolkit メソッドでは、図5の401に示す
ようにシステムプロパティとして定義されているRMIToo
lkitクラスの実装クラスを捜してそのクラスのオブジェ
クトを生成し、リターン値として返す。 【0035】ホストコンピュータ110のJava仮想マシ
ン313はRMIToolkitの実装クラスとしてHRMIToolkit
クラスを使用するようシステムプロパティが設定されて
いるため、getDefaultToolkit のリターン値としてHRMI
Toolkit クラスオブジェクトが返される。HRMIToolkit
クラスオブジェクトのgetPrinterメソッドは、図9の4
05に示すようにHPrinterクラスオブジェクトを返すよ
うになっている。このようにしてPrinter クラスの実装
オブジェクトとしてHPrinterクラスオブジェクトが取得
できる。 【0036】図10の406,407に示すようにHPri
nterのgetAttributeメソッドは、RMI を使用してネット
ワークからprintserver を探し出す。このとき、オフィ
ス機器のPrintServer クラスオブジェクトが発見され、
PrintServer クラスのリモートオブジェクトのgetAttri
buteメソッドを呼び出す。オフィス機器120のPrintS
erver クラスでは図12の408に示すようにユーザア
プリケーションと同様の方法によってプリンタ属性リス
トをオフィス機器で取得し、ホストコンピュータに返し
ている。このときの動作はユーザアプリケーションがオ
フィス機器で動作するときと全く同じ動作をする。 【0037】このようにして、ユーザアプリケーション
はホストコンピュータ上で動作しているにも拘らず、あ
たかもオフィス機器で実行されているかのようにプリン
タ属性リストを取得することができる。 【0038】 【発明の効果】以上の説明で明らかなように、本発明に
よれば、機器に組み込まれJavaに代表されるオブジェク
ト指向言語で且つ機種非依存なコードにより実行される
プログラムをネットワークを通じてホストコンピュータ
上でデバッグする場合、特定のクラスのサブクラスで実
行される環境に合った実装クラスオブジェクトを取得す
る実装クラスオブジェクト取得手段と、ホストコンピュ
ータ上で実行されるプログラムの代わりに機器上で各ク
ラスオブジェクトの生成・削除、クラスオブジェクトの
メソッド呼び出し等を行うリモートプロキシ手段を有
し、ホストコンピュータ上で前記実装クラスオブジェク
ト取得手段によって取得されたクラスオブジェクトが自
分自身に行われる操作をそのまま前記リモートプロキシ
手段に対して伝えるリモートメソッド伝達手段を備える
ように構成することによって行うようにしたため、開発
に多大な労力の必要で、実行する際にも資源を多く必要
とする機器のシミュレータをホストコンピュータ上に準
備する必要もなく、外部に公開するAPIを最小限にし
てセキュリティを確保することができるという効果が得
られる。
Description: BACKGROUND OF THE INVENTION [0001] 1. Field of the Invention [0002] The present invention debugs a program to be incorporated in an apparatus that uses a program language executed on a virtual machine represented by a Java language program for device control. About the method. 2. Description of the Related Art Microprocessors are mounted on devices such as office equipment such as printers, copiers and fax machines, and household equipment such as refrigerators, telephones and microwave ovens, and the devices are controlled by a program executed by the microprocessor. It is generally done. Programs executed by the microprocessors in these devices are called device embedded software. [0003] In recent years, with the increase in performance of microprocessors, the increase in capacity of storage devices such as memories and hard disks, and the reduction in price, etc., software embedded in devices, especially in office equipment, has been enhanced in function and scale. I have. As software embedded in devices has become more sophisticated and larger in scale, software development has become more complex and the development period has become longer. In particular, the microprocessors used in these devices and the real-time OS for controlling the devices may be changed due to various reasons such as cost issues, even in the same series of products.
As a result, programs that ran on the previous product will no longer run on the later developed product, and will often have to be recreated from the beginning. This is a factor that significantly reduces the productivity of crisis embedded software. On the other hand, in the field of computers, software must be developed for each processor architecture and operating OS. Therefore, when it is desired to use the same software on the entire network to which various computers are connected, it is necessary to develop and maintain the software individually for all combinations of the processor architecture, the OS, the device configuration, and the like. For this reason, a Java language that enables the execution of exactly the same program on all computers without depending on the processor architecture, OS, device configuration, and the like has been developed and used. [0005] In order to solve the productivity problem of the embedded software, the Java language developed for computers has been increasingly used for equipment embedded software. In Java, a source program is translated into a virtual machine code called a bytecode, and the bytecode is interpreted and executed on a virtual machine realized on each computer. Executable above. In addition, a standard API (Application Programmin
g lnterface) is provided, and the functions of the OS are abstracted. As long as the standard API is used, there is no need to directly call the functions of the OS or the middleware running on the OS. Therefore, if a standard API is used, a Java program to be installed in a device and executed can be directly operated on a computer. As a result, it is possible to use a Java program development tool for a computer to develop a device embedded program from coding to test / debug on the computer. However, office equipment and the like often have specific functions different from computers.
In order to build a Java program to use those functions, a Java API for those functions needs to be provided. In general, these APIs are implemented by calling existing program modules written in other than Java in order to use device-specific functions.
In order to execute a Java program using the device-specific functions on a computer, a Java API for using these functions must be built on the computer. However, since an existing program module for using a device-specific function on a device cannot be executed on a computer, a Java API created for the device cannot be executed on a computer. Therefore, the following two methods are generally adopted. 1) Simulate the unique functions of the device on a computer. Develop software that simulates the functions of the device on a computer and use it from the Java API. 2) A program module of a device-specific function that accesses a program module of a device-specific function from outside the device is modified so that the program module of the device-specific function can be accessed from outside the device.
Access the device's program module inside the Java API on the computer. [0011] The above two methods have the following problems. First, in the method 1), most of the functions unique to the device are often realized by hardware, and the hardware must be simulated on a computer. Generally, simulation of hardware requires a large amount of computer resources, and therefore, a high-performance computer is required for the simulation. In the method 2), since a program that is not originally disclosed to the outside must be disclosed, a program for disclosure or a program for preventing unauthorized use from the outside must be developed. However, there is a problem that the program scale is increased. The present invention has been made in view of the above problems, and the object thereof is to require a great deal of labor for development.
There is no need to prepare a simulator for a device that requires a lot of resources on the host computer when executing it, and a method for debugging a device embedded program that can secure security by minimizing the API exposed to the outside is provided. Is to do. [0015] In order to achieve the above object, the present invention provides an object-oriented language typified by Java and executed by a machine-independent program executed by a machine through a network. When debugging on the host computer, an implementation class object acquisition unit that acquires an implementation class object suitable for the environment executed by the subclass of the specific class, and each class on the device instead of the program executed on the host computer Remote proxy means for generating / deleting an object, invoking a method of a class object, etc., wherein the class object acquired by the implementation class object acquisition means on the host computer performs the operation performed on itself by the remote proxy And performing by configured with remote method transmitting means for transmitting against. Embodiments of the present invention will be described below with reference to the accompanying drawings. The present embodiment is implemented using RMI (Remote Method Invocation) which is a Java standard class library. FIG. 1 is a block diagram showing the configuration of an apparatus for carrying out the method of the present invention. In FIG. 1, reference numeral 110 denotes a host computer.
10 is a CPU 111, a ROM 112, a RAM 113,
Network device 114, hard disk 11
5, a bus 116 and an input / output device 117. CP
The U111 controls the entire host computer 110 and performs data operations. The ROM 112 stores a control program for the host computer 110, initial data, and the like.
The RAM 113 provides a temporary storage area for information processing. The network device 114 transmits and receives data to and from an external device. The hard disk 115 permanently stores various programs, data, and the like. I / O device 1
Reference numeral 17 denotes a device for inputting / outputting data and performing operation instructions. The bus 116 connects the above-described units and transmits various data inside the host computer 110. Reference numeral 120 denotes office equipment such as a printer. The office equipment 120 includes a CPU 121 and a ROM.
122, RAM 123, network device 12
4. It comprises a special device 125 and a bus 126. CPU
Reference numeral 121 controls the office equipment 120 as a whole and performs data calculations. The ROM 122 stores a control program for the office equipment 120, initial data, and the like. The RAM 123 provides a temporary storage area for information processing. The network device 124 transmits and receives data to and from an external device. The special device 125 is a device that realizes the special function of the office equipment 120.
If is a printer, it corresponds to a print engine that prints on paper. The bus 126 connects the above components and transmits various data inside the office equipment 120. FIG. 2 is a diagram expressing the configuration of a program executed on the office equipment 120 as a hierarchy.
The upper layer represents that the function is realized by calling the program of the lower layer. In FIG. 2, reference numeral 201 denotes hardware whose configuration is the office equipment 120 shown in FIG. 1, 202 denotes an operating system that controls the hardware 201 and executes programs, and 203 interprets and executes byte codes. Virtual machine 204, a Java library composed of Java classes
An API library 205 is a native access layer for connecting between Java and a routine written in a language other than Java in the Java API library 204, and 206 is a Java accessed from the native access layer 205.
Routines, which are routines written in languages other than
A library 207 is an application described in Java that performs various processes by calling the Java API library 204. FIG. 3 shows a Java application 207.
Is a diagram expressing a configuration of software executed on the office device 120 and the host computer 110 when the computer is executed by the host computer 110 and debugging is performed. 3, reference numeral 311 denotes hardware of the host computer 110; 312, an operating system of the host computer 110; 313, a Java virtual machine of the host computer 110; 314, a Java API library of the host computer 110; Access layer,
An RMI skeleton 316 is executed on the office device 120 on behalf of the Java application 207. Reference numerals 201 to 207 denote the same components as in FIG. FIGS. 4 to 13 are diagrams showing examples of Java programs. FIG. 4 is an inheritance diagram of each class, and FIG. 5 is an RMIToolkit.
6 is a source code list of the Printer class, FIG. 7 is a source code list of the TRMIToolkit class which is a subclass of the RMIToolkit class, and FIG. 8 is Tprint which is a subclass of the Printer class.
source code list of the er class, FIG. 9 is a source code list of the HRMIToolkit class which is a subclass of the RMIToolkit class, FIG. 10 is a source code list of the HPrinter class which is a subclass of the Printer class, and FIG.
Interface for RMI remote access
A source code listing of the RPrinter interface that inherits the Remote interface, and FIG. 12 shows UnicastRemote0bj, a class for calling the RMI remote method.
A source code list of a PrintServer class that is a subclass of the ect class and implements the RPrinter interface, and FIG. 13 is a source code list of a user application to be debugged. This embodiment will be described with reference to the above-mentioned drawings. First, the operation when a user application is executed on the office equipment 120 will be described. Here, as a user application, a printer is assumed as an office device, and a function of obtaining various attribute values of the printer as a list of character strings is assumed. When a user application is executed on an office device, the class of RMIToolkit, Printer, TRMIToolkit, NA
As L205, the TPrinter class exists as a library. Also, the native library 206 includes TPri
There is a native method routine called from the nter class. The user application is shown in FIG.
Is configured to display a printer attribute list when a button is pressed. When the button is pressed, the actionPerformed method of the TestApp class constituting the user program in FIG. 13 is called. Among them, Prin at 409
The ter class object is fetched, and the attribute list is fetched by calling the getAttribute method of the Printer class object. The Printer class object is obtained as follows. First, getDefau for the RMIToolkit class
By calling the ltToolkit method, get the RMIToolkit class object used as a standard value in the currently executing environment. GetD in RMIToolk t class
In the efaultToolkit method, RMIToolkit defined as a system property as indicated by 401 in FIG.
Find the class implementation class, create an object of that class, and return it as the return value. Office equipment java
The virtual machine 203 uses TRMI as the implementation class of RMIToolkit.
Since the system property is set to use the Toolkit class, the TRMIToolkit class object is returned as the return value of getDefaultToolkit. TRMI
The getPrinter method of the Toolkit class object is
As shown at 403 in FIG. 7, a TPrinter class object is returned. In this way, a Tprinter class object can be obtained as an implementation object of the Printer class. As shown at 404 in FIG. 8, getA of TPrinter
The ttribute method is the native method getAtt
Call rib and getAttrib gets the attribute value from the routine that manages the printer attributes. Next, the operation when the user application is executed on the host computer 120 will be described. When the user application is executed on the host computer, a Java API 2 is installed in the office equipment.
04, each class of RMIToolkit, Printer, and TRMIToolkit, and TAL class as NAL 205 as a library. Further, the native library 206 includes a native method routine called from the TPrinter class. Further, an RMI class PrintServer class having an interface shown in FIG. 11 for RMI is executed, and the RMI rmiregistry command is used.
PrintServer class is registered to the network as printersaver. Of course, stubs and templates of the PrintServer class are also prepared in the office device 120. The host computer 110 has Java
The API 314 includes RMIToolkit, Printer, and HRMIToolkit classes, and the NAL 315 includes the HPrinter class as a library. When the button of the user application is pressed, the actionPerformed method of the TestApp class constituting the user program in FIG. 13 is called. Among them, get the Printer class object at the part indicated by 409 and getAttribu of the Printer class object
The attribute list is obtained by calling the te method. The Printer class object for the host computer 110 is obtained as follows. First, getDefau for the RMIToolkit class
RMIToolkit used as a standard value in the environment of the host computer by calling the ltToolkit method
Get class object. In the RMIToolkit class
In the getDefaultToolkit method, RMIToo defined as a system property as shown at 401 in FIG.
Search the implementation class of lkit class, create an object of that class, and return it as a return value. The Java virtual machine 313 of the host computer 110 uses the HRMIToolkit as an implementation class of the RMIToolkit.
Because the system property is set to use the class, the return value of getDefaultToolkit is HRMI
Returns a Toolkit class object. HRMIToolkit
The getPrinter method of the class object is 4 in FIG.
As shown in FIG. 05, an HPrinter class object is returned. In this way, an HPrinter class object can be obtained as an implementation object of the Printer class. As shown at 406 and 407 in FIG.
nter's getAttribute method finds a printserver from the network using RMI. At this time, the PrintServer class object of the office equipment is found,
GetAttri for remote objects of PrintServer class
Call the bute method. PrintS of office equipment 120
In the erver class, as shown at 408 in FIG. 12, a printer attribute list is acquired by the office equipment in the same manner as in the user application, and is returned to the host computer. The operation at this time is exactly the same as when the user application operates on the office equipment. In this way, the user application can acquire the printer attribute list as if it were being executed on an office device, even though it is running on the host computer. As is apparent from the above description, according to the present invention, a program which is installed in a device and executed by machine-independent code in an object-oriented language typified by Java and executed through a network is provided. When debugging on the host computer, an implementation class object acquisition unit that acquires an implementation class object suitable for the environment executed by the subclass of the specific class, and each class on the device instead of the program executed on the host computer Remote proxy means for generating / deleting an object, invoking a method of a class object, etc., wherein the class object acquired by the implementation class object acquisition means on the host computer performs the operation performed by itself on the remote proxy means To By providing a remote method transmission means for transmitting the information, a simulator of a device that requires a great deal of effort in development and requires a lot of resources for execution is prepared on the host computer. There is no need to obtain the effect that the security can be ensured by minimizing the API exposed to the outside.

【図面の簡単な説明】 【図1】本発明方法を実施するための機器の構成を示す
ブロック図である。 【図2】オフィス機器のソフトウェア構成を示す図であ
る。 【図3】デバッグ時のソフトウェア構成を示す図であ
る。 【図4】Javaプログラムの例を示す図である。 【図5】Javaプログラムの例を示す図である。 【図6】Javaプログラムの例を示す図である。 【図7】Javaプログラムの例を示す図である。 【図8】Javaプログラムの例を示す図である。 【図9】Javaプログラムの例を示す図である。 【図10】Javaプログラムの例を示す図である。 【図11】Javaプログラムの例を示す図である。 【図12】Javaプログラムの例を示す図である。 【図13】Javaプログラムの例を示す図である。 【図14】ユーザアプリケーションの画面例を示す図で
ある。 【符号の説明】 110 ホストコンピュータ 111 CPU 112 ROM 113 RAM 114 ネットワークデバイス 115 ハードディスク 116 バス 117 入出力デバイス 120 オフィス機器 121 CPU 122 ROM 123 RAM 124 ネットワークデバイス 125 特殊デバイス 126 バス
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a configuration of a device for performing a method of the present invention. FIG. 2 is a diagram illustrating a software configuration of an office device. FIG. 3 is a diagram showing a software configuration at the time of debugging. FIG. 4 is a diagram illustrating an example of a Java program. FIG. 5 is a diagram illustrating an example of a Java program. FIG. 6 is a diagram illustrating an example of a Java program. FIG. 7 is a diagram illustrating an example of a Java program. FIG. 8 is a diagram illustrating an example of a Java program. FIG. 9 is a diagram illustrating an example of a Java program. FIG. 10 is a diagram illustrating an example of a Java program. FIG. 11 is a diagram illustrating an example of a Java program. FIG. 12 is a diagram illustrating an example of a Java program. FIG. 13 is a diagram illustrating an example of a Java program. FIG. 14 is a diagram illustrating an example of a screen of a user application. [Description of Signs] 110 Host computer 111 CPU 112 ROM 113 RAM 114 Network device 115 Hard disk 116 Bus 117 Input / output device 120 Office equipment 121 CPU 122 ROM 123 RAM 124 Network device 125 Special device 126 Bus

Claims (1)

【特許請求の範囲】 【請求項1】 機器に組み込まれJavaに代表されるオブ
ジェクト指向言語で且つ機種非依存なコードにより実行
されるプログラムをネットワークを通じてホストコンピ
ュータ上でデバッグする場合、特定のクラスのサブクラ
スで実行される環境に合った実装クラスオブジェクトを
取得する実装クラスオブジェクト取得手段と、ホストコ
ンピュータ上で実行されるプログラムの代わりに機器上
で各クラスオブジェクトの生成・削除、クラスオブジェ
クトのメソッド呼び出し等を行うリモートプロキシ手段
を有し、ホストコンピュータ上で前記実装クラスオブジ
ェクト取得手段によって取得されたクラスオブジェクト
が自分自身に行われる操作をそのまま前記リモートプロ
キシ手段に対して伝えるリモートメソッド伝達手段を備
えるように構成することによって行うことを特徴とする
機器組込みプログラムのデバッグ方法。
Claims 1. When debugging a program, which is incorporated in a device and is executed by machine-independent code in an object-oriented language represented by Java, on a host computer through a network, a specific class of Implementation class object acquisition means for acquiring an implementation class object suitable for the environment executed by the subclass, creation / deletion of each class object on the device instead of the program executed on the host computer, method call of the class object, etc. And a remote method transmitting means for transmitting the operation performed by the class object acquired by the implementation class object acquiring means on the host computer to the remote proxy means as it is. Debugging equipment embedded programs and performing by configuring the so that.
JP2001343047A 2001-11-08 2001-11-08 Debug method for equipment incorporating program Pending JP2003150405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001343047A JP2003150405A (en) 2001-11-08 2001-11-08 Debug method for equipment incorporating program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001343047A JP2003150405A (en) 2001-11-08 2001-11-08 Debug method for equipment incorporating program

Publications (1)

Publication Number Publication Date
JP2003150405A true JP2003150405A (en) 2003-05-23

Family

ID=19156804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001343047A Pending JP2003150405A (en) 2001-11-08 2001-11-08 Debug method for equipment incorporating program

Country Status (1)

Country Link
JP (1) JP2003150405A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006260085A (en) * 2005-03-16 2006-09-28 Ricoh Co Ltd User authentication device, image forming device, user authentication method and user authentication program
JP2010191578A (en) * 2009-02-17 2010-09-02 Kyocera Mita Corp Software development system and software development method
JP2011022637A (en) * 2009-07-13 2011-02-03 Kyocera Mita Corp Application operation confirmation system, program for terminal and program for server
US8291386B2 (en) 2008-08-21 2012-10-16 International Business Machines Corporation System and process for debugging object-oriented programming code
US8683439B2 (en) 2008-08-21 2014-03-25 International Business Machines Corporation System and process for debugging object-oriented programming code leveraging preprocessors
JP2014056608A (en) * 2009-07-24 2014-03-27 Ricoh Co Ltd Information processing apparatus, external device, information processing system, information processing method, and program
US8752020B2 (en) 2008-08-21 2014-06-10 International Business Machines Corporation System and process for debugging object-oriented programming code leveraging runtime metadata

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006260085A (en) * 2005-03-16 2006-09-28 Ricoh Co Ltd User authentication device, image forming device, user authentication method and user authentication program
JP4727263B2 (en) * 2005-03-16 2011-07-20 株式会社リコー Image processing apparatus, user authentication method, and user authentication program
US8291386B2 (en) 2008-08-21 2012-10-16 International Business Machines Corporation System and process for debugging object-oriented programming code
US8683439B2 (en) 2008-08-21 2014-03-25 International Business Machines Corporation System and process for debugging object-oriented programming code leveraging preprocessors
US8752020B2 (en) 2008-08-21 2014-06-10 International Business Machines Corporation System and process for debugging object-oriented programming code leveraging runtime metadata
JP2010191578A (en) * 2009-02-17 2010-09-02 Kyocera Mita Corp Software development system and software development method
JP2011022637A (en) * 2009-07-13 2011-02-03 Kyocera Mita Corp Application operation confirmation system, program for terminal and program for server
JP2014056608A (en) * 2009-07-24 2014-03-27 Ricoh Co Ltd Information processing apparatus, external device, information processing system, information processing method, and program

Similar Documents

Publication Publication Date Title
US6011920A (en) Method and apparatus for debugging applications on a personality neutral debugger
Bierbaum et al. VR Juggler: A virtual platform for virtual reality application development
US5596702A (en) Method and system for dynamically sharing user interface displays among a plurality of application program
US6957439B1 (en) Method, system, and program for mapping objects in different language formats
CA2165893C (en) Visual application partitioning for creating distributed object oriented applications
US6868454B1 (en) Distributed-object development system and computer-readable recording medium recorded with program for making computer execute distributed-object development
CN105637478B (en) Computer-assisted development of native mobile application code
US20020099868A1 (en) Method and system for associating parameters of containers and contained objects
EP1650663A2 (en) Automated Software Testing using a layered architecture
EP0654735A1 (en) Apparatus and methods for analyzing a system of processes
JP5820339B2 (en) Extended attributes of applications generated using 4th generation programming tools
JPH081624B2 (en) System and method for displaying program applications
US6941520B1 (en) Method, system, and program for using a user interface program to generate a user interface for an application program
JPH0827769B2 (en) Communication interface generation system and method
US20080133214A1 (en) Method and system for child-parent mechanism emulation via a general interface
US5991538A (en) System for generating and using programs in an object-oriented environment with a message dispatch architecture
CN105159670A (en) Universal cockpit display control system software development framework
CN112685035A (en) Project development method and device, computer-readable storage medium and electronic device
US10296299B2 (en) Server-side weaving of application-oriented-programming advice into computer code that preempts client-side load-time weaving
CN111459606A (en) Method for quickly creating virtual machine under virtualization and server
JP2003150405A (en) Debug method for equipment incorporating program
Schlägl et al. GUI-VP Kit: A RISC-V VP meets Linux graphics-enabling interactive graphical application development
US8676842B2 (en) Creating multiple Mbeans from a factory Mbean
WO2004088508A2 (en) A method of creating software that is portable across different operating systems
Grechanik et al. Creating web services from gui-based applications