File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why i cant rmic my HotelRemote?

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
sumuhan umamaheswarampillai
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Leo Ho
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11833
181
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Leo Ho
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 918
IntelliJ IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew, I own you 400 $.
Regards Mihai.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic