• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

package problem

 
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.
 
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
 
please buy my thing and then I'll have more money:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic