Step 1:
You can create all the RMI server and client classes in default projects normally.Code your application normally.
Step 2:
In compilation first you need to build the classes using IDE,then from terminal change the working directory to /netbeansprojects/build/classes
now give
rmic
this will generate your Stub and skeleton class
Step 3:
Start the rmiregistry from the same directory to include your classpath.
now you can run the server.
Precautions:
1. Make sure that your rmiregistry includes your classpath,also take care of the port number and class name at the time of binding of the object to the registry.
2. Make sure that you are using right version of rmic and rmicompiler while working in linux.
Advances:
you can modify xml ANT script of your project in “build-impl.xml” file.
you can build the stub for the file from IDE only by using ANT script.
ANT is some what similar to Makefile in linux.
No comments:
Post a Comment