Hi Mike,
-The client side of my application uses pictures (icons), I could not run the client after being packaged in a JAR file, the program can not access these pictures within the JAR file, what I should do to fix this problem?
You might want to write a
very small program that demonstrates using pictures, show us your directory structure, and show us the command you use to create your jar file. We can then replicate your steps locally and work out what is wrong.
On the server side can I always start the RMI server on the same port (1099), do I have to give the user the option to change this port, if so, will this be done via a GUI on the server side, I do not actually want to implement a GUI on the server side, do I have to?
Two totally seperate issues here - one is the port number and the other is a server GUI.
Personally I believe that the application is much nicer if it has the ability to run on a different port than 1099. Imagine if every
Java server application only ran on port 1099 - you would need one server per application. However you dont get points for going beyond the requirements - you can make a design decision here.
If you do not have a GUI for the server, how do you specify where the data file is located?
If I have to specify the registry port number, the client will have to know the port number from the server side, isn’t this confusing?
Maybe a little. But normally when you start at a company you are told certain things such as what server hosts your email, what server hosts the internal website ... Why not also be told what port this application needs the very first time it runs?
- It happens that the exception occurs after having the file lock or the record lock ownership (in my implementation, the lock and the unlock processes are invoked in the server side, I mean on the Data layer) do I have to treat this case, it is pretty complicated to check within the try block, if the thread has the ownership of the file or the record, when an InputOutput or RemoteException occur, do we have to simply exit the application, I think this is the easiest was, is it acceptable? In this case, when an exception occurs, the client will be informed that the server has stopped and the later needs to be restarted, how did you deal with the exceptions?
You might want to break this out into a seperate topic.
What does the client need to know if a BoundException occurs?
When can that exception occur?
Regards, Andrew