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
Joined: Jun 04, 2001
Posts: 147
posted
0
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
Joined: Jun 26, 2001
Posts: 3
posted
0
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
Joined: Nov 22, 2008
Posts: 18944
posted
0
Then your project resides on c:\ You should set your classpath: set classpath=%classpath%;c:\ Hope this helps!!! Benjamin
Diana Heiden
Greenhorn
Joined: Jun 26, 2001
Posts: 3
posted
0
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
Joined: Jun 04, 2001
Posts: 147
posted
0
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=