Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

rmic error

 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting following error when I do c:\personal\javadeveloper\suncertify\db>rmic Data.
What could be the problem ?
Error: File c:\personal\javadeveloper\suncertify\db\Data.class does not contain type Data as expected, but type suncertify.db.Data. Please remove the file, or make sure it appears in the currect subdirectory of the class path.
Error : Class Data not found
I have all files including Data.class in
c:\personal\javadeveloper\suncertify\db\
And CLASSPATH is c:\personal\javadeveloper;c:\personal\javadeveloper\suncertify\db
My DataInterface class is defined as
package suncertify.db;
import java.rmi.*;
public interface DataInterface extends Remote {
and Data class is defined as
package suncertify.db;
import java.io.*;
import java.util.*;
import java.rmi.*;
import java.rmi.server.*;
public class Data extends UnicastRemoteObject implements DataInterface{
Thanks
Dilip

[This message has been edited by Dilipkumar Kalyankar (edited March 13, 2001).]
[This message has been edited by Dilipkumar Kalyankar (edited March 13, 2001).]
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try starting it down two levels at c:\personal\javadeveloper; run "rmic suncertify.db.Data" - it's just a package problem.
 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. It worked. Only thing is it created Data_Skel.class and Data_Stub.class under c:\personal\javadeveloper. I think I should move those files to c:\personal\javadeveloper\suncertify.db.
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the structure of those generated files, they should be in the proper packages. I think that you can generate them elsewhere by command line switches to rmic.
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic