Will this app run on 2 separate machines ? To
test the app
you should run it on two separate machines. That way you can be sure that you get your security policy correct. It is also recommended that you take your final jar file and install it on a machine on which you have not done so before, following the step by step instructions you wrote for the examiner.
Ok , the problems i am having is where does the db.db must reside on client or on server ? If i place it on Server how will client access DB if it's on different machine. I don't know how this can be. Should there be 2 copies of Data class one on client and on server ? Think of it this way.
When you are running in remote mode, you are following the client/server model. All access to the db is controlled by the server object. So in this case the client will be talking to the server, and the server will have the file open. The server will have to be able to map a drive to the path specified in your command line parameters.
When you are running in local mode, it is a single user application. All access is coming from one user. In this mode the application will open the file himself. Therefore the file must be in a place which can be mapped to by the single user application.
So, if the single user has a drive mapped E: for example, the file can be in the same directory as the server application (which could be the server's C drive). The same goes for the classpath, you could put the Data class on the server, but this would not be recommended for performance reasons. So you would probably have a separate jar file nested in your main jar file that had everything that the client needs with its own directory structure and own copies of classes it needs. Of course the source code to this is only in one place.
[This message has been edited by Rick Fortier (edited June 07, 2001).]