• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

NX: Packaging of Submissions

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
************************************************************
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.
****************************************************************
* What does these mean? All class, including suncertify.db, suncertify.server and suncertify.client are all packeted in the same file: runme.jar? if it does, how to execute the program?
can it run like this:
java -jar <path_and_filename> [<mode>]
Server:
java -jar runme.jar -Djava.security.policy=policy.txt suncertify.server.Server localhost 1000 data/db-1x1.db
Client:
java -jar runme.jar suncertify.server.Client server localhost 1000
comment pls!
*******************************************************************
*******************************************************************
Packaging of Submissions
All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:
1. The executable JAR containing the programs. This must be called runme.jar.
2. The original, unchanged database file that was supplied to you. Note that you must keep a copy of the original database file supplied to you, and this must be the file you submit. The marking process will expect the exact same data without any changes.
3. A directory called code, containing all the source code and related parts of your project. You must create subdirectories within this to reflect your package structure and distribute your source files within those directories.
4. A file called version.txt. This must contain pure ASCII (not a word processor format) indicating the exact version of JDK you used, and the host platform you worked on.
5. A directory called docs, containing the following items at the top level:
1> This html file.
2> A subdirectory called javadoc, containing HTML/Javadoc documentation for all classes and interfaces you are submitting.
3> A file called choices.txt that containing pure ASCII (not a word processor format) text describing the significant design choices you made. Detail the problems you perceived, the issues surrounding them, your value judgments, and the decisions that you made. This document should also describe any uncertainties you had regarding the project, and the decisions you made when resolving them.
4> User documentation for the database server and the gui client. If your user documentation is online then you may omit this file. However, if the documentation is not online, you must provide either a single plain ASCII (not word processor format) text document, which must be called userguide.txt, or multiple HTML files which must all be accessible from a starting point document that must be called userguide.html.
*********************************************************************
QESTION:
What do I need included in the userguide.html? some introduce about how to exectue the program, some function about the program, the structure of all files of the submit assignment and anything else do need to add.
Does it need to have a readme.txt file at the root.
GIve your idea.
***********************************************************************
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fei xiao:
************************************************************
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]

***********************************************************************


Hi,
my understanding is that this command is the one you 'MUST' use, anything else will result in an automatic fail.
For example, to start the server you use:
java -jar <path_and_fileName> server
To start the client using a network connection use:
java -jar <path_and_fileName>
To start the client locally use:
java -jar <path_and_fileName> alone
If the assessor needs to do anything else to run your assignment,
you will have big problems.
************************************************************
QESTION:
What do I need included in the userguide.html? some introduce about how to exectue the program, some function about the program, the structure of all files of the submit assignment and anything else do need to add.

***********************************************************************
The user guide is exactly that. It tells a 'user' how they should run your application, the functionality it provides and how they get to it.
I think it is worth writing the user guide, then asking someone who knows nothing about your assignment to try to use your application with the user guide as their only source of information. If they can do this, you have probably hit the mark.
Regards,
Alison
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Fei,
I think Alison has given you good advice. Given that your intstructions say:


************************************************************
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.
****************************************************************


then, I don't think the follwing meets the requirements:


Server:
java -jar runme.jar -Djava.security.policy=policy.txt suncertify.server.Server localhost 1000 data/db-1x1.db
Client:
java -jar runme.jar suncertify.server.Client server localhost 1000


Specifically, the bolded parts don't seem to be allowed by the specification quoted above and I would expect that requiring their use would result in automatic failure.
Check your instructions, but I would think that security policy files are explictly prohibited in the section that discusses restrictions on the use of RMI. In the client case, what is the purpose of the "suncertify.server.Client" part, wouldn't this be contained in the runme.jar? Things like "localhost" and "1000" are probably candidates for inclusion in the suncertify.properties file, since they're prohibited as command-line arguments.
Hope this helps,
George
[ January 22, 2004: Message edited by: George Marinkovich ]
 
fei xiao
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your help.
I am not familiar with packeting of application. Can you give me sime information about how to packet my application. And then I can run my program as the requirement.
Thank you.
Another three questions:
1. Is it to say that I must have a class to decide which mode to run. such as
class RunMode {
public static void main(String args[]) {
if (args.length == 0) {
new Client("network");
} else if (args.length == 1) {
if (args[0].equals("server")) {
new Server();
} else if (args[0].equals("alone")){
new Client("alone");
}
} else {
.....
}
}
and in the 'manifest' file, just to type
Main-Class: RunMode
2. Thing like 'local host' '1000' 'data\db-1x1.db' should be in the file of 'suncertify\properties' , when the program run, it will read the parameter from this file?
3. my RMI server can not run if no security policy file, how to deal with this kind of situation?
[ January 23, 2004: Message edited by: fei xiao ]
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Fei,
I really recommend the following book as it covers the details of packaging your application in addition to many other valuable things having to do with the exam:
The Sun Certified Java Developer Exam with J2SE 1.4
Briefly, to create your executable (which I'm assuming is named runme.jar, and further assuming that your *.classes files are located within your package structure under a classes directory) you'll end up doing something like this:
jar cvfm /xxxxxx/xxxXxxxxxx/runme.jar /xxxxxx/xxxXxxxxxx/Manifest.MF
-C /xxxxxx/xxxXxxxxx/classes .
where, the Manifest.MF looks something like:
----------------------------------------------------------
Manifest-Version: 1.0
Main-Class: xxPackagexx.xxPackagexx.RunMode
----------------------------------------------------------
Of course, there's more extensive packaging to do when you're ready to submit your project, but that information exists elsewhere on the forum and I don't think you'll need to do that for a while.
1) Yes, that's a reasonable way to do it.
2) Take a look at the Properties class in the Java API. Properties can be loaded from the suncertify.properties file, they can be retrieved and set, and then stored back to the file.
3) Check your assignment instructions looking for something like the following:


Restrictions on RMI
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:

You must not require the use of an HTTP server.
You must not require the installation of a security manager.
You must provide all classes pre-installed so that no dynamic class downloading occurs.
You must use RMI over JRMP (do not use IIOP)


If you have similar requirements then I don't think you can use a security manager. I didn't need to use one so perhaps our systems are set up differently. I haven't ever used a security manager so I don't know much about them.
Hope this helps,
George
[ January 24, 2004: Message edited by: George Marinkovich ]
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic