This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dear friends - can you please help me

 
Diana Heiden
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends
i am silent watcher of this forum. this is my first question.
i am new to RMI.
i put classes in the following structure
package : suncertify under this
package : client
package : shared
package : server
package : db
policy : FBN.policy
i don't how to set classpath to execute this program. if i copy all the files in one directory without package name it works fine. if i put in the appropriate directory it is not working. i just copy the stub file from server to client.
i execute like this
c:\> start rmiregistry
c:\>java -Djava.security.policy=suncertify\FBN.policy suncertify.server.SeverStart
sometimes server works and sometimes not. my question is classpath is playing a roll here? i do not know how to set classpath? how to unset classpath?
my client side
c:\> java -Djava.security.policy=suncertify\FBN.policy suncertify.client.FlyByNight remote
this not working- remote object can not be accessed. is there any problem that i just copy stub file to client?
is there any classpath needed?
i am confused . please loving friends help me
Diana
TelAviv
Italy
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a package named suncertify.db, and the package
resides in your c:\myproject\suncertify\db directory, you need to set your classpath to include c:\myproject.
Hope this helps.
 
Diana Heiden
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Rick
i have directory and package as suncertify
c:\suncertify\db, server, client, etc.
i have no head directory like myproject. can i write like this to set classpath to execute client program.
set classpath=%classpath%;\suncertify
because they can install any drive is it?

pls. confirm
thanks rick
Diana
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then your project resides on c:\
You should set your classpath:
set classpath=%classpath%;c:\
Hope this helps!!!
Benjamin
 
Diana Heiden
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear benjemin
thanks
what the following set up mean?
set classpath=%classpath%;.;
can i give instead of set classpath=%classpath%;c:\
how to unset classpath before running rmiregistry
c:\> unset classpath - this is not working
expecting your reply
best regards
Diana
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Diana Heiden:
dear benjemin
thanks
what the following set up mean?
set classpath=%classpath%;.;
can i give instead of set classpath=%classpath%;c:\
how to unset classpath before running rmiregistry
c:\> unset classpath - this is not working
expecting your reply
best regards
Diana

the unset command is for unix. in windows I guess you
would do: set classpath=
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic