doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in the jar archive? or u use something else to display the HTML pages?
2) the localization is not like the windows one. it's like the english version of MS-office and chinese of MS-office. therefore, different language version has different constant class. thus, there shouldn't be a problem.
Answers:
1) This problem has similar solution to the internationalization problem, supprisingly--use java resource bundles!
jEditorPane.setPage(YourClass.class.getResource("relative_path/file.html"));
2) The problem of your approach of contant class: no one can customize your application for a new language without knowning Java! Instead, if you do it using ResourceBundle + MessageFormat, the correct resource (.properties file) can be automatically loaded for the user system's default locale, and the correct language will be used automatically. Also, someone else can localize your application without a simple text editor without using any JDK at all.
jEditorPane.setPage(YourClass.class.getResource("relative_path/file.html"));
2) The problem of your approach of contant class: no one can customize your application for a new language without knowning Java! Instead, if you do it using ResourceBundle + MessageFormat, the correct resource (.properties file) can be automatically loaded for the user system's default locale, and the correct language will be used automatically. Also, someone else can localize your application without a simple text editor without using any JDK at all.