This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
good night colleagues a stupid question, but i have made searches in old posts and could not find response. i'd like to have in my executable jar (both for client and server) the html files for the online help my application uses, but i can't make this work, the system is not able to find the help/index.html file unless i put outside the jar. any advise please? thank you very much [ November 02, 2002: Message edited by: Jaun Katabasis ]
Hi Jaun, could you please let me know how you solved the problem? Thank you!
Joined: Jun 20, 2001
Hello my jar test file has 'help' and 'suncertify' (and META-INF) as directories. helpURL = ClassLoader.getSystemResource (HELP_FILE_NAME) where HELP_FILE_NAME is defined in ClientConstantsI and values "help/hlp.html" works ok but for some reason, if i provide to getSystemResource an argument something like HELP_FILE_DIR + System.getProperty("file.separator") + HELP_FILE_NAME ( this is, "help\\hlp.html" ) it will work ok if executed in uncompressed directories but not inside the jar. that was my initial problem. i don�t like the solution, as hardcoding "/" as file separator goes against portability, but i can�t find a better solution. [ November 04, 2002: Message edited by: Jaun Katabasis ]
Joined: Apr 07, 2002
Hi Jaun, thank you for the hint! I'll try it. Regarding the slash "/", try this:
I usually assign the return value to a constant in an interface, which contains all sorts of constants and is available to the application as a whole. Hope this helps. [ November 04, 2002: Message edited by: Mag Hoehme ]