Do we need to put in instructions of how to set up the classpath in the readme.txt,so as before the examiner tries to run the client or server code he/she set up the classpath as per instructions.
This might look like a silly question, but i have read somewhere,that an executable jar file,doesnt need to have classpath set.
I would think it is required. The instructions are pretty clear on this.
If any environmental setup is required, do not just say what needs to be done; provide instructions on how to perform the setup. For example, do not say something like "add server.jar to your classpath". You should document exactly how to add the jar file to the classpath
I think they are really clear about this.
Just before the client and / or the server is being started i need to add all the classfiles to the classpath.
So i say this in the readme.txt
on a command prompt please do the following
C:> set CLASSPATH=%CLASSPATH%,C:\fbnassignment;
I do not need the java home variable set in my assignment. WHen they are trying to unjar my files I tell the following
Let us assume that jDK is installed under C:\
then please do the following
C:\jdk1.3.1\bin\jar xvf c:\fbn\server.jar
I dont think doing this should be a problem.
I am not very clear on what you have said. At least in my assignment there is a need to add server.jar to the server machines's classpath and the client.jar to the client machine's classpath.
How else will the server and client know where to find the classes? Did I not understand what you were trying to say?
the instruction does not ask for that.
Actually, we run this application, and our needed classes are in the current working directory, so we don't need to add them into the classpath,
During my test, I removed the java_home, classpath, and just put the java.exe into the PATH, everything goes well.
In the new assgnment, the instructs requires the application can only bs started using this approach:
java -jar runme.jar [mode]
no matter what mode this application running.
You said: in my assignment there is a need to add server.jar to the server machines's classpath and the client.jar to the client machine's classpath
This is not a requirement in the instructions is it? It is just a requirement because of your next statement:
How else will the server and client know where to find the classes?
If you are just using a "vanilla" jar file, then you probably need to set the class path.
But it becomes so much easier if you use an executable jar file. All I need to do to run my client application is type: java -jar client.jar
No classpath, no codebase, no security file.
Same for my server application: just java -jar server.jar
Of course, you can optionally add parameters to make either one behave differently. The client app also has an options screen so that the user can select modes etc., but it just works out of the box.
I do have a comment in my README.txt telling the user to change to the directory where they extracted the contents of my submitted jar file. But that is all I said. Technically that is not needed either, but it reduces the chances of someone breaking something.