aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes userguide.html question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "userguide.html question" Watch "userguide.html question" New topic
Author

userguide.html question

Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Hello,

how can i set the url for the userguide.html file in the docs directory?
The following doesn't work


Thank you for replies

Oliver


SCJP
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
Originally posted by Bodenstab Oliver:
Hello,

how can i set the url for the userguide.html file in the docs directory?
The following doesn't work


Thank you for replies

Oliver




where currentDir = System.getProperty("user.dir") and USER_GUIDE_PATH = "docs/userguide.html"
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Hi Oliver,

Is your docs directory in your class directory? Because that is where getSystemResource will look.

The solution of Ta I am not completely happy with, because that will only work if the application is started in the directory that contains the docs directory and of course we cannot be sure that the user will do it like that.

Frans.


SCJP 1.4, SCJD
Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Hi,

i have the following instructions:

The JAR file must have the following layout and contents in its root:
A directory called docs, containing the following items at the top level:
User documentation must all be accessible from a starting point
document that must be called userguide.html.

So under the root i have a directory docs with the file userguide.html.

Oliver
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
I had the same directory layout. For me it worked when running from the jar file. When running from the .class files, I had to create my docs directory in my classes directory.

Frans.
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
Originally posted by Frans Janssen:

The solution of Ta I am not completely happy with, because that will only work if the application is started in the directory that contains the docs directory and of course we cannot be sure that the user will do it like that.

Frans.


We can be sure Frans, the instructions clearly say how it should be packaged, and how the application should be run. You have a very good point though, and I suspect the only reason I didn't lose marks for documentation is because of the instructions.
Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Hey Frans,

can you tell me how you get the url
Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Should i put it in two directories, the docs and the suncertify.client?
With the following statement it works.

But if i do this that way, i don't access the file in the docs directory.

So please help

Oliver
Samuel Pessorrusso
Ranch Hand

Joined: Jul 21, 2005
Posts: 164
Currently i use Ant to create the JAR file, so I copy the useguide.html to the source folder. With this approach, my application can run only with the runme.jar without doc/ directory structure.
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Originally posted by Bodenstab Oliver:
[QB]Should i put it in two directories, the docs and the suncertify.client?

Well of course you need to include your docs directory into your jar file.

Frans.
Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Maybe this is the solution:



It works in the runme.jar file.

What do you think?

Oliver
Samuel Pessorrusso
Ranch Hand

Joined: Jul 21, 2005
Posts: 164
Don't you think that your runme.jar must be independent of the directory structure that it is ? That is why I copy the userguide into the source folder qhen I'm building the runme.jar.
Bodenstab Oliver
Ranch Hand

Joined: Mar 03, 2005
Posts: 47
Hello Samuel,

i decide to add the docs folder with userguide.html file because of the instructions by SUN


A directory called docs, containing the following items at the top level:
This html file.
A subdirectory called javadoc, containing HTML/Javadoc documentation for all classes and interfaces you are submitting.
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.
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.



What do you think???
Has the userguide file be in a directory called docs for the runme.jar??
Samuel Pessorrusso
Ranch Hand

Joined: Jul 21, 2005
Posts: 164
I have a folder called "docs" with all the required content.
But (there are always a but) my code searchs for the userguide.html inside its own folder (inside the code folder). Of course I won write 2 userguide.html so when I'm generating the runme.jar (using ANT) I copy the userguide.html to the code folder and then I pack everything (runme.jar, code and docs directory) in a full.jar file (I will rename it before upload)
With this approach, if somebody unpacks just the runme.jar from full.jar, it will still show the help content correctly (evend without a docs folder).

If you write a userguide.html file, its not necessary to provide a help inside your application, I do that as a plus.




Regards

Samuel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: userguide.html question
 
Similar Threads
non java files in the code direcotry, a deploy question
Question about package
Putting user Help file on GUI
server.jar can NOT find _stub, help!
Deciding user dir when in root