aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Packaging questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Packaging questions" Watch "Packaging questions" New topic
Author

Packaging questions

christy smile
Ranch Hand

Joined: Oct 15, 2001
Posts: 101
Hi, All,
I have several questions related to the packaging.
(1) I am planning to create two jar files for the server and client, they are FBNServer.jar and FBNClient.jar respectly. With these jars, I can start the client with java -jar FBNClient.jar, and server in the similar fashion. My question is should these two jars be significantly different (besides the manifest file)? Ideally, the client does not need anything in the server package, then how do I exclude the esrver package while makeing the jar? The command file I am using now is:
jar -cfm FBNClient.jar Manifest.mf -C classes .
where classes is the directory that includes all the generate class files with the directory sturecture (i.e., suncertify.client.gui, etc..).
(2) Do I need to jar up the html directory (all the on-line documents and snap shots reside in this directory) as well for the submission? Or I can just have a directory for the html files under the submitted directory.
The same question applies to the javadoc as well.
Thank you very much!
Christy
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Christy, my knowledge goes to 2 jar files client.jar and server.jar and all the files in normal forms. Then make the final one as runme.jar that contains client.jar, server.jar and all other files. That should be enough, provided you are a beta tester like me!


Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Ashik,
I'm not sure about your packaging. I don't think you have to make a client.jar and server.jar and put both within runme.jar...
Read the following discussion that gives an elegant solution:
http://www.coderanch.com/t/182032/java-developer-SCJD/certification/packaging-beta


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Yes Valentin,
making client.jar and server.jar is not a requirement rather my convenience to pack related classes together, just convention.
runme.jar
|
| +- client.jar
| +- server.jar
| +- code
| +- docs
| +- etc. etc. etc.
The instrcutions.html tells must for runme.jar only.
Pete Lyons
Ranch Hand

Joined: Aug 18, 2002
Posts: 109
Christy,
1. For example, my server code is in suncertify.rmi, so you could do:
jar cvf /tmp/FBNClient.jar suncertify/db suncertify/ui_swing suncertify/util suncertify/*.class
To get everything but the server files. I think it would be fine to include exactly the same class files in both jars, but I took the Swing UI code out of my server jar.
2. I pretty sure you do not have to jar the javadoc. As for the html files and help images, I have them both outside and inside the jar so that they can be browsed using a normal web browser, as well as accessed by the program if you're running it with just the jar file. You can use
To get an URL for your help file from within the jar, and pass that to a JEditorPane to get your "online" help working.
Pete
Pete Lyons
Ranch Hand

Joined: Aug 18, 2002
Posts: 109
P.S. I wanted to link to this other thread that you may find relevant.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Ashik,
runme.jar is the name of the JAR that should be executable not the name of the JAR to upload on the CertManager.
The server should be launched by running
java -jar runme.jar server
the standalone client by running
java -jar runme.jar alone
the networked client by running
java -jar runme.jar
I don't see how you achieve this :roll:
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

O Valentin, I feel I was going to make a gross mistake!
Then start anew, It means I have to upload one jar file say ab00001.jar that will be unpacked by the examiner in a directory where the directory structure after he has unpacked should be like ---
META-INF
========
ab00001
========
|
|+- version.txt
|+- docs
.......|+- javadocs...
.......|+- choices.txt
.......|+- userguide.txt
|+- code
.......|+- suncertify.....(noth .java and .class files, may be client.jar and server.jar here)
|+- runme.jar
|+- optionally, may provide the db file here (outside runme.jar) or anywhere else not outside the directory ab00001
Then the questions arises, my class files are packed in the runme.jar file. then why should I procide them again in code/suncertify/...directories. Is it not redundant? Or here I have only to provide the .java files?
You see I am confused! Please have our opine here...
[ October 03, 2002: Message edited by: Ashik uzzaman ]
christy smile
Ranch Hand

Joined: Oct 15, 2001
Posts: 101
Hi, Ashik,
Just curious what kind of things do you put in your docs directory. Thanks.
Christy
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

cristy there was a space related problem in my figure. See it again and now you'll find it!
christy smile
Ranch Hand

Joined: Oct 15, 2001
Posts: 101
Hi, Ashik,
Cool... I wonder how come it did not load correctly the first time...
BTW, do you provide on-line help at all? I read some other post about separating the userdoc to two parts, one for client and one for server, what do you think about that?
Christy
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Well I have no time to improve my applications features. I'll just only fulfill the musts and ofcourse my choices.txt will say frequently that I chose it because it would have taken less time than the other options available.
My help will not be online help. I am planning to make userguide.html that will have link to userguide_client.html and userguide_server.html. But hey, I have just only created the file parser now (though even incomplete) and a lot to do yet!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Packaging questions
 
Similar Threads
README.TXT : file listing
gurus, pls help me out.
Urgent........please respond..question about EAR files
executable jar file
ant not deploying on Tomcat 7