RMI - stub creation with rmic
I am stuck with creating stubs for my simple RMI implementation. With command line, I am at directory, where I have my class files stored.
For me it is: C:\Users\John\Documents\NetBeansProjects\testServer\build\classes\RMI
RMI here is the package I have my files in. Now when I am in this folder, I开发者_如何学运维 tri to make stubs with rmic -v1.2 -keep CountingOnServer, but command line writes me, that class CountingOnServer not found. No matter what I am doing, still it is writing such a unbelivable mistake... do you know how to solve that?
Thx
As a guess, issue is that CountingOnServer
is inside some package, so you should use full name like RMI.CountingOnServer
. Don't forget to run rmic from the the class-path root which in your case seems to be build\classes
directory.
If you have your RMI implementation in packages run rmic at the root of your class files, ex,
|-- build
| |-- classes
| | `-- com
| | |-- client
| | | `-- TestRMI.class
| | |-- rmi
| | | |-- Hello.class
| | | |-- HelloInterface.class
| | | `-- Hello_Stub.class
| | `-- RMTServer
| | `-- RmiServer.class
I have my classes in build/classes/com/rmi directory so, to create stubs I can run rmic at the root as,
../build/classes/rmic com.rmi.Hello
精彩评论