用Java来设计COM服务器一问???(5分)

  • 主题发起人 主题发起人 kem
  • 开始时间 开始时间
K

kem

Unregistered / Unconfirmed
GUEST, unregistred user!
根据《Thinking in Java》一书,我写了一个简单的class在windows2000professional上当COM服务器使用,类写好了:
public class COMServerKemble
{ private int addend;
private int result;
public void setAddend(int a){ addend = a;}
public int getAddend(){return result;}
public void sum(){result += addend;
}
public void clear(){
result = 0;
addend = 0;
}
}
模仿书上的做法,在win2000的命令行敲入:C:/>javareg /register /class:COMServerKemble /progid:JavaCOMServerKemble.COMServ
erKemble.1 /typelib:JavaCOMServerKemble.tlb
但是,结果说:'javareg' is not recognized as an internal or external command,
operable program or batch file.
请问,这个javareg执行文件是不是win2000自带的??没有的话,去哪里有呢??
多谢!!!!
 
You have to install Visual J++ first,
By the way, Ido
n't think java invoke COM object is a good idea. EJB is better
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部