• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package problem

 
Devu Shah
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody,
Here's what i am stuck with,
I am getting an class cast exception while using the stub class which i import to my client side from the server package.
please any one could tell me what the problem is.
also please tell me how to run rmic with package extension
i.e i want to use rmic for my "Data" class which resides in my
suncertify.db package.Do write me the whole path.
because when ever i run my rmic from the parent directory with my package extension it creates the stub and skeleton in parent directory and i want it in the suncertify/db directory.
else the client gives me stub not found error.
 
Jayakumar Duraisamy
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can send the compiled classes to the directory you wish by using -d flag.
For example,
Assume that you have the following directory structure.
1.src
1.1 suncertify
1.1 db
2.classes - you want the classes to be compiled and put here.
java -classpath src;classes -d classes suncertify.db.Data will generate data class and place it under classes under suncertify/data.
Same for rmic.
You do

rmic -classpath src;classes -d classes suncertify.db.Data.
I guess the way you copy ur stub class file to ur client is wrong. you have to copy the stub with the exact package structure under client.
Hope this helps
Jay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic