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

One jar file or seperate jar files

 
xiao gao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All
I am just writing the user document and programmer note, I want to know whether I can put all the class file into one jar file and include this file when I run server and client.
I find lots of people here use two jar files one is for server, the other is for client. It is ok but where I put the stub class. It seems I have to put stub class both in server and client jar file. Is it too much redundency?
Need I create skeleton and stub for my application compatiable to both jdk1.1.* and java 2 or just use only one stub class used in java 2?
Any advice?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think of your reuse objectives! The Data class and its networked version should be completely generic and reusable. They can be expected to lead an independent life, so they are best packaged separately from the remainder of the application. You can use the Class-Path attribute in the Manifest file to tie the jars together.
A simple but clean packaging could be:
  • jar A with the local Data, the Data interface, and remote Data stubs
  • jar B with the Data network enhancements and the remote Data skeletons
  • jar C with the flight booking client; its class path would include jar A
  • jar D with the flight booking server code; its class path would include jars A and B
  • If your server is completely generic you could merge jars B and D.
    - Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic