I have written rmi server code in netbeans 6.5. how can i use rmic in netbeans 6.5 so that i can create server_stub class?
If you use Spring's remote proxying (RmiProxyfactoryBean
), you don't need to generate any stub/skel classes at all. Spring just does all the magic for you behind the scenes. You don't even need to implement the Remote
interface!
See the docs here
you cannot use rmic through netbeans. you need to generate the server stub manually by running the rmic command at the command line. but in case of eclipse you can generate the stub from the ide with the help of rmi plugin.
Does RmiProxyfactoryBean can be used for localhosts in a simple RMI project? I mean is making stub with this is easy for beginner and does it cost to learn how it works?
You have to insert the below code into your build.xml file.
<target name="startRMI" depends="init"> <exec executable="rmiregistry" dir="${build.classes.dir}"> </exec> </target>
Then right click -> build.xml -> Run target -> Other targets -> startRMI
This will start the RMI registry.