Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About submit

 
Jack Yang
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have three package in my app,client,server,db.
In server package,I have RemoteDB,RemoteDBImpl,ConnectionFactory,ConnectionFactoryImpl.Before I run my client,I have to add server.jar into CLASSPATH.But if the client runs in other computer,the server.jar should be copy into that machine.But if I change the interfaces into client package,when the server runs,I have to add client.jar into class path.
Anyone has some good ideas how to put them?
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jack,
Just put the server directory into the client jar and the client directory in the server jar. That way there is no need to change the CLASSPATH.
Hope this helps,
Michael Morris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic