问题
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?
回答1:
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
回答2:
Why not edit the standard build.xml located in the project root directory? Include the Rmic Ant task. This will automatically rmic your classes every time you build a project in netbeans.
回答3:
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.
回答4:
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.
来源:https://stackoverflow.com/questions/1067499/using-rmic-in-netbeans