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

Final questions

 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've finished everything for the application (coded and tested), but now I have three questions (well, three bullet points with questions. . .)
1) What's the best way to package your classes? I have three under suncertify - db, client and server.
2) What's the best way to set up the jar file? Should I jar the classes and put them in a jar?
Is it expected the examiner will want the class files to be jarred and execute from them?
If so, do you require the user to extract the jarred classes from the submission jar in order to execute? (I don't have a lot of experience in this area - would appreciate some ideas).
3) What seems the best way to implement using java.rmi.server.codebase? Do we have to implement this?
I really would appreciate some help. Thanks.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jim,
1) What's the best way to package your classes? I have three under suncertify - db, client and server.

Looks good to me. I also had a fourth package: help because I had a HelpFrame that both client and server used for online help.
2) What's the best way to set up the jar file? Should I jar the classes and put them in a jar?
Is it expected the examiner will want the class files to be jarred and execute from them?
If so, do you require the user to extract the jarred classes from the submission jar in order to execute? (I don't have a lot of experience in this area - would appreciate some ideas).

Your better off making executable jar files for both client and server, that avoids environmental setup (CLASSPATH that is). The examiner must unpack the jar file so don't even mention that in your Readme.txt file. Just let him know where both client and server are located when you describe your command lines. I put my client and server in a directory named /executables along with my security policy file and a copy of the original db.db.
3) What seems the best way to implement using java.rmi.server.codebase? Do we have to implement this?

I designed my server so that the java.rmi.server.codebase property was unnecessary. I also started the RMI registry from the server with LocateRegistry.createRegistry(port). If you need to set the codebase property though then do it on the command line something like this:

The key is if your client/server works properly without setting it when you test then don't. There is no reason to believe that your client/server will somehow behave differently when the examiner runs it.
Hope this helps,
Michael Morris
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,
Thanks for the reply. I've been obsessing about this for the last two days since I completed everything. The codebase stuff had me concerned. I guess the only thing left to do is finish up the user doc, upload the project, take the exam and relax. . .for about 10 minutes. I've already started working on the SCWCD cert. . .
Thanks again!
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jim,
Believe me, I am so glad it is over. It took just over a week for me to get the results back and I was a nervous wreck the whole time. I bet I went back and looked at my Readme.txt file fifty times in that week (even though what are you going to do at that stage anyway?) So just cross all your T's and dot all your I's and try to relax while you wait.
Michael Morris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic