This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Problem in rmic - stub generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Problem in rmic - stub generation" Watch "Problem in rmic - stub generation" New topic

Problem in rmic - stub generation

prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
This is what I am getting :

C:\111\com>rmic RServerImpl
error: File .\RServerImpl.class does not contain type RServerImpl as expected, but type com.RServerImpl. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
error: Class RServerImpl not found.
2 errors

C:\111\com>rmic -classpath c:\111 RServerImpl
error: Class RServerImpl not found.
1 error

my classpath is : "C:\j2sdk1.4.2_04;C:\j2sdk1.4.2_04\jre\lib\setToClassPath;c:\ant\lib;.;D:\DB2\IBM\SQLLIB\java\;D:\DB2\IBM\SQLLIB\java\db2jcc.jar;D:\DB2\IBM\SQLLIB\java\;D:\DB2\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;D:\DB2\IBM\SQLLIB\java\db2jcc_license_cu.jar;D:\DB2\IBM\SQLLIB\bin;D:\DB2\IBM\SQLLIB\tools\db2XTrigger.jar;D:\DB2\IBM\SQLLIB\java\common.jar;C:\Program Files\Java\jdk1.5.0\bin;D:\bea\weblogic91\server\lib\api.jar;C:\111;"

My files "RServerImpl" & "RServerIF" (both java & class files) are in directory "C:\111\com"

Can anyone tell me, why this is happening ?

scjp, scwcd
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

It appears that the name of your file is:

When you use rmic you need to specify the full name of your impl class including all the com. mycompany. etc

Ed's latest article: A Java Parallel Calamity
prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
Thanx friend its working now with
>rmic -classpath c:\111 com.RServerImpl
Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

If you use JDK5.0, there is no need to generate this stub or skeleton.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Problem in rmic - stub generation
It's not a secret anymore!