Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • 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

dear friends - can you please help me

 
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
 
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
 
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=
 
I don't always make ads but when I do they're tiny
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic