Forums Register Login

readme and package questions

+Pie Number of slices to send: Send
1 . Must I list every step compile the SOURCE files to CLASS file in readme files? What if i didn't do this?
2 . I have serval gif files for client GUI , Is it ok to package these gif in client.jar?
+Pie Number of slices to send: Send
Not quite sure exactly what you mean in question 1, but for question 2, I should think it's fine to package gifs in your client.jar.
Remember if you do this to access them from your code by using Class.getResource instead of accessing the local file system directly.
For example, instead of:

use

Note the addition of a leading slash "/" to the path, as getResource takes a URL, and leading with a slash creates a relative URL (as opposed to a file path where leading with a slash creates an absolute path).
This method uses the class loader to get the resources (you can also use Class.getResourceAsStream if you want to read files, for example, properties files) and will try the JAR file first if that's where your code came from, and then the local filesystem if the requested resource is not inside the JAR.
[ May 18, 2003: Message edited by: Damian Ryan ]
+Pie Number of slices to send: Send
Hi Kevin,
I didnt see anything in the instructions that would indicate that I have to tell the examiner how to compile my code.
There is a requirement that I list every file that is in my distribution, along with a short description of what it is.
Regards, Andrew
+Pie Number of slices to send: Send
Hi, Damin,
Assume the help menu provides html help pages. Can these html pages be put into client.jar? How should index.html set the link to the next page in such situation? Thanks.

Hi, Andrew,
Is your assignment an old version? My assignement (new version) does not required to list all files.
+Pie Number of slices to send: Send
Hi Shan,
Yes, I am doing the old FBNS exam, which has the following requirement in things I should submit:


A README.txt file ... that describes to the examiner the following information in exactly the order listed:
....
The names of the files you have submitted, with a note of their location in the directory structure, and a high level description of the purpose of each.


Just checked the UrlyBird (hotel) assignment, and there is nothing like this requirement in that assignment.
Regards, Andrew
+Pie Number of slices to send: Send
Not sure about hyperlinking between html pages from inside a JAR - never tried that myself.
I am sure the method I mentioned earlier would be fine for accessing the first page programatically (when the user clicks the help button/menu item) but I confess I don't know what would happen about pages linked to from that first page.
In a situation like this I usually just write some code and see what happens
Also, take a look at the swing set demo that accompanies the J2SDK. I don't know for sure if there are any html help pages in there, but if there are you can take a quick look at the source code for an answer to your problem.
+Pie Number of slices to send: Send
Hi Damian,
You said:

Not sure about hyperlinking between html pages from inside a JAR - never tried that myself.
I am sure the method I mentioned earlier would be fine for accessing the first page programatically (when the user clicks the help button/menu item) but I confess I don't know what would happen about pages linked to from that first page.


I also havent tried it, but I can see that it should be easy to do. If you are implementing HyperlinkListener then you can handle the hyperlinkUpdate programatically so you can get all subsequent pages from the jar file sa well.
I havent done this though ... I have left the user documentation pages as regular files (once the distribution jar file has been extracted). This gives the user more flexibility, in that the can browse the help pages using their favourite browser if they want to.
Even in real life this would give more flexibility to the user: do you really want to implement bookmarks and printing and mutiple pages open simultaneously and (name your favourite browser function here) in your online help application?
Despite that, I still think an online help program is very good. It makes the application a little more turnkey ... the user just starts the app, and if they get into problems, they can click on a help button rather than trying to find where the help pages were installed.
Also you said:

In a situation like this I usually just write some code and see what happens


Since starting this assignment I have written 67 programs just to test concepts that I thought about or saw written here, before doing the real coding for my assignment. I think I have written far more test code than real code :roll:
Regards, Andrew
+Pie Number of slices to send: Send
Hi Andrew,
thanks for mentioning the HyperlinkListener. I didn't know about that - I'll add it to my inventory
I agree with what you say about not attempting to duplicate a browser's functionality in a help dialog.
I also left the user guide documentation as regular html files outside the client.jar, though I did package the gif's for the buttons and the config files (I did the old FBN assignment - still waiting to see whether I passed or failed...)
[ May 19, 2003: Message edited by: Damian Ryan ]
+Pie Number of slices to send: Send
thanks for your all warmhearted, excusing for my late come here. I got the answers. Anyway, thanks!
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 912 times.
Similar Threads
readme file
Packaging the assignment (comments)
painting an image
Packaging jars
storing images in the database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:26:12.