• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

userguide.html question

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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"
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bodenstab Oliver
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 442
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Frans,

can you tell me how you get the url
 
Bodenstab Oliver
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe this is the solution:



It works in the runme.jar file.

What do you think?

Oliver
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic