• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me, Online user doc

 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Iam using JEditorPane to display my html userdocs file, Here the problem comes when test is after bundling it in the jar file, i have my html file in the help\clientUsage.html, which fource me to hardcode the path in my ClassLoader.getResource(help\filename). Is there any way to fix it with out hardcoding.
thanks & regards,
rameshkumar
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you will have to hardcode something. To me, getResource("/foo/bar.html") is no worse than hardcoding a classname in new foo.Bar(). After all, it's basically the very same thing.
Do use a static final String FIELD though.
- Peter
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot..........PETER
-rameshkumar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic