This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, I have a scenario in which I have a remote interface and interImpl.java and RMIServer.java which contains the main() method with naming.rebind(). Now I have to create the stub and skeleton. I gave the command as rmic fullpathofinterimpl(c:/test/interImpl) But I get the error class not found. and then I gave rmic c:/test/RMIServer (this is the class contain main()) yet the same error Then rmic c:/test/interImpl RMIServer. Yet same error.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Jul 03, 2003
Nathan, Thanks a lot for replying. For now I used RMI plugin to generate the stubs but eventually I have to come up with a script. The actual implementation is like this, I have a seperate interface (not RMI one) and three classes implement this and they perform different operations. Again I have a diff RMI Interface and RMIImpl class which calls the above 3 defined calsses. So, now it is a bunch of classes not a single class as per my previous post. So in this scenario how should I create the stubs and skeletons?. Say, I create a .jar file of all the classes and put the jar in the classpath later on, how to proceed, rmic test.jar? I need help please.
I haven't tried it myself (because I've usually created the stubs , and then JARred the implementation classes and stub classes into the JAR all together), but I'm pretty sure that all you would do is specify the JAR file containing the implementation classes on the -classpath of rmic. Remember, in rmic you specify the classes that you want to create stubs of - not the class files. The path to the class files (whether a JAR or a directory) get listed as the -classpath property, then you specify the classes you want to create stubs from (remember - full class names - i.e. com.whatever.ClassName).