Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is rmic still needed?

Tags:

java

rmi

Is it true that the rmi interface compiler is not needed for java 1.5 or newer and that just compiling the java file where the UnicastRemoteObject is defined with javac is enough?Rmic still works and it generates a stub class file if you give it the class file of the implementation of the remote object.

like image 876
Range Avatar asked Jan 15 '11 23:01

Range


People also ask

Is RMIC deprecated?

Deprecation Note: The rmic tool has been deprecated and is subject to removal in a future release. Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated.

What is the work of RMIC command?

rmic generates stubs and skeletons for remote objects.

What is RMIC in Java?

DESCRIPTION. The rmic compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes.

What is RMI Registry?

RMI registry is a namespace on which all server objects are placed. Each time the server creates an object, it registers this object with the RMIregistry (using bind() or reBind() methods). These are registered using a unique name known as bind name.


2 Answers

According to the RMI tutorial:

http://download.oracle.com/javase/tutorial/rmi/overview.html

Compiling Sources

As with any Java program, you use the javac compiler to compile the source files. The source files contain the declarations of the remote interfaces, their implementations, any other server classes, and the client classes. Note: With versions prior to Java Platform, Standard Edition 5.0, an additional step was required to build stub classes, by using the rmic compiler. However, this step is no longer necessary.

like image 140
alampada Avatar answered Oct 19 '22 17:10

alampada


See the preamble to the Javadoc for UnicastRemoteObiect. You can avoid using rmic under specific circumstances, i.e. when you construct or export the remote object providing a port number parameter (even zero), for reasons described in the documentation.

like image 23
user207421 Avatar answered Oct 19 '22 17:10

user207421