Forums Register Login

How to Jar?

+Pie Number of slices to send: Send
Hello Everybody:
I am planning to have three jar files for submission. They will be scjd.jar, client.jar, and server.jar. Under scjd.jar I am thinking to have README, docs, all.policy, db.db, client.jar, and server.jar files.
My client.jar and server.jar will be excutable jar files. I am kind of confused here. Each excutable jar file needs an entry point MANIFEST.MF right! I need two MANIFEST.MF files one for client and one for server. How can I have two MANIFEST.MF file with the same name at same place. How you guys have done it? By the way I am writting first MANIFEST.MF file by myself then only I am using jar command as below.
jar cvfm client.jar MANIFEST.MF suncertify\client\*.class
Any response in this regards highly appriciated. Thanks in advance for response. Have a great day everybody. -Bal
+Pie Number of slices to send: Send

I had created a directory structure as follows
c:\devexam
main directory which is the base
in ther I had
c:\devexam\suncertify\client
c:\devexam\suncertify\db
c:\devexam\suncertify\help
for my package directories.
then I had a
c:\devexam\manifest\client
c:\devexam\manifest\server
in each of those I had a separate manifest file.
So when I jarred the files I used the following batch file.

It put some files in the client that the client didn't need, so I would opent he jar file in Winzip and remove those server files not needed.
Hope that helps
Mark
+Pie Number of slices to send: Send
Hey Mark your batch file is cool. I liked it. Just for curiosity. Did you include this batch file in your submission? I think you did not right! You made your own small tool to produce jar files right.
Thank you. -Bal
+Pie Number of slices to send: Send
No, I did not include it in the submission. I had actually made a bunch of batch files to save me time. Especially when I was javadocing. I would make spelling errors, forget something, blah, blah, blah, and have to recreate the javadocs. even though this batch had only one line in it. I had one for running RMIC for creating my Stubs, and one for running the server and client in remote and local modes.
But I made sure none of them were in my submission, because I could not guarantee that the accessor had a windows machine.
Mark
+Pie Number of slices to send: Send
or you could use Ant tasks, which is what i did to take care of all the building and stuff for you.
heres my build.xml
+Pie Number of slices to send: Send
So then how do you use the build.xml?
It looks pretty cool.
Mark
+Pie Number of slices to send: Send
Hey Mark, check it out, its from Apache jakarta project, its called Ant, its kinda like Make for Java.

Ant Page
+Pie Number of slices to send: Send
I have to agree! Ant is an excellent tool which is great to utilize. You will be hearing alot about it soon. I have even saw "Ant" as a desired skill in some Java Job descriptions.
+Pie Number of slices to send: Send
why do we need ant for this project. the examineer is not going to build the project. it is for own personal purpose. a normal batch file would help.
ant is useful for deploying ejb's.
+Pie Number of slices to send: Send
Hi,
I've got to agree. Ant is the Dogs Bo**ocks when it comes to build and deployment for Java.
I'm also using it for the SCJD project. I've got tasks, amongst others, to create the javadocs and run junit tests. One thing I like is that it can produce the report from the junit tests as XML which it can run through a stylesheet for you! I think there is also a task to make you a cup of coffee :-)
There are tasks for just about anything you could imagine - and if there isn't a task you can write your own!
Certainly something for your CV.
Cheers,
Steve
+Pie Number of slices to send: Send
Hi,
Its a personal choice of course. I'm only using Ant for build and deployment as I'm familiar with it, its easy to use, has a lot of nice features, and it means I don't have to try and hack around with a half baked batch language to build and deploy. Maybe I'm just allergic to goto statements!!! :-)
However, for anyone who is about to start the project or has just started then its probably worth investing some time in Ant as its growing in popularity - I wouldn't like to have to build and deploy an enterprise application with platform specific batch files!
Cheers,
Steve
+Pie Number of slices to send: Send
Hi
i have looked briefly into ant it seems interesting. However i wonder if it is nesessary to be proficient at xml to utilize it.
also any other good sites giving an introduction to it for a beginner.
tom mcmorrow
+Pie Number of slices to send: Send
Hi,
I don't think its really necessary to know too much about XML. As long as you know attributes, elements and that a start tag must have a corresponding end tag. The Ant dtd can be used to validate your build.xml and in fact it probably does validation when you call a task.
Its really straight forward and easy to use - all the tasks (built-in and optional) are in the docs. Its really intuitive - for instance:
<mkdir dir="c:\mydir" />
will create a new directory and
<echo>This is a message</echo>
will echo a message when you call the task.
I don't know of any other sites for Ant but I've never needed one - all the information, including tutorials, is on the Ant site.
I hope this helps,
Cheers,
Steve
+Pie Number of slices to send: Send
hi Steve
Do i need to install a xml parser to use ant or is it part of the ant download. I see file crimson.jar is this sufficient on my Classpath or do i need say Sun's parser.
Thanks in advance
tom
+Pie Number of slices to send: Send
Hi,
You just need to download Ant. The download comes with the Apache Crimson XML Parser - though you can change it for another JAXP compliant parser but I've never needed to. The only other thing you need is a JDK on your system. You then set the ANT_HOME environment variable and off you go!
Cheers,
Steve
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1240 times.
Similar Threads
jar files
error in running server- problem with jar file
question about "help class" for mark
jarring submission
Jar
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:37:02.