This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Why i cant rmic my HotelRemote? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Why i cant rmic my HotelRemote?" Watch "Why i cant rmic my HotelRemote?" New topic
Author

Why i cant rmic my HotelRemote?

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi all,

Please help me. My HotelRemote is packaged in suncertify.rmi; and extends UnicastRemoteObject implements HotelInterface. The HotelInterface extends Remote and also packaged in suncertify.rmi; . In directory "E:\java\assign\suncertify\rmi>" I javac HotelRemote and get HotelRemote.class . But when i type the command "rmic HotelRemote" in the same directory, the computer says "error: Class HotelRemote not found." Why?What is wrong here?


SCJP 1.4 SCJD
sumuhan umamaheswarampillai
Greenhorn

Joined: Jun 19, 2002
Posts: 12
which version of Java are you using? If it is 1.5 you don't really need rmic

http://java.sun.com/j2se/1.5.0/docs/guide/rmi/relnotes.html

if you are using 1.4 or earlier then it could be the class path.
You might find this link helpful

http://patriot.net/~tvalesky/easyrmi.html

especially the section 'Problems that you may run into'
And it may be a good idea to go through this document in full to see if you have missed anything.
[ April 12, 2006: Message edited by: sumuhan umamaheswarampillai ]

SCJD
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Taking a very quick glance at the toolsdoc for rmic, I see that you must use the fully qualified class name. So it will be: rmic suncertify.rmi.HotelRemote with your CLASSPATH set to include the location of the suncertify directory.

Does that do the trick?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Leo Ho
Ranch Hand

Joined: Mar 31, 2005
Posts: 36
Originally posted by sumuhan umamaheswarampillai:
which version of Java are you using? If it is 1.5 you don't really need rmic

http://java.sun.com/j2se/1.5.0/docs/guide/rmi/relnotes.html

if you are using 1.4 or earlier then it could be the class path.
You might find this link helpful

http://patriot.net/~tvalesky/easyrmi.html

especially the section 'Problems that you may run into'
And it may be a good idea to go through this document in full to see if you have missed anything.

[ April 12, 2006: Message edited by: sumuhan umamaheswarampillai ]


Can we use the dynamic stub feature of Tiger? In Andrew's book, he mentioned that if dynamic class loading is used then we cannot use Tiger 5 dynamic stub. However I don't think dynamic class loading has anything to do with this new Tiger feature. Anyway, ideas?

leo
Leo Ho
Ranch Hand

Joined: Mar 31, 2005
Posts: 36
Oops, I misused the words, "if dynamic class loading is used then we cannot use Tiger 5 dynamic stub" should be changed to "if dynamic class loading is forbidded by the instructions then we cannot use Tiger 5 dynamic stub".

Anyone use dynamic stub of Tiger 5 on his/her assignment?

Leo
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11432
    
  85

Me to Sun:

Hi,

In the current assignments, under "Restrictions on RMI", there is the statement "You must provide all classes pre-installed so that no dynamic class downloading occurs."

One of the major enhancements to RMI in JDK 5 was the ability for dynamic generation of stub classes.

On the one hand, I feel that a solution developed under JDK 5 does have all the necessary classes available. However I suspect that using the dynamic generation of stubs may cause problems with the restrictions on RMI.

Can you please confirm whether we are allowed to use the dynamic generation of stubs in SCJD assignments?

Thanks and regards,

Andrew Monkhouse

Sun to me:

You may not use dynamic stub generation.
Short, and explicit

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Leo Ho
Ranch Hand

Joined: Mar 31, 2005
Posts: 36
Thanks a lot Andrew, then I would not risk my $400 to use dynamic stub generation.

Men, I happen to use JDK 5.0 for my solution, but until now the only feature I use is generic for the collections - nothing else. The other "cool" features like the new concurrent package or dynamic stub are either complex (compared with the plain old 'synchronized') or forbidded

Leo
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Andrew, I own you 400 $.
Regards Mihai.


SCJP, SCJD, SCWCD, OCPJBCD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why i cant rmic my HotelRemote?