Collection of minor issues encountered during eclipse RCP Series 5 Development

Source: Internet
Author: User
These small questions will affect development, and it is time consuming to search for these questions. Here we will transfer out the questions I encountered during the learning process and find the answers.
1. using third-party controls in RCP development is not the same as using third-party controls (LIB) in general development.
Http://www.javazy.com/contentex/200644225825.shtml
2. When you use an attribute file, the reading of the attribute file is slightly different. Http://blog.csdn.net/explorering/archive/2006/10/11/1330709.aspx)

1. Use the load () method of Java. util. properties class
Example:
Inputstream in = lnew bufferedinputstream (New fileinputstream (name ));
Properties P = new properties ();
P. Load (in );

2. Use the getbundle () method of the Java. util. resourcebundle class
Example:
Resourcebundle RB = resourcebundle. getbundle (name, locale. getdefault ());

3. Use the constructor of the Java. util. propertyresourcebundle class
Example:
Inputstream in = new bufferedinputstream (New fileinputstream (name ));
Resourcebundle RB = new propertyresourcebundle (in );

4. Use the getresourceasstream () method of the class variable
Example:
Inputstream in = jproperties. Class. getresourceasstream (name );
Properties P = new properties ();
P. Load (in );

5. Getresourceasstream () method of Java. Lang. classloader obtained by using class. getclassloader ()
Example:
Inputstream in = jproperties. Class. getclassloader (). getresourceasstream (name );
Properties P = new properties ();
P. Load (in );

6. Use the getsystemresourceasstream () Static Method of the Java. Lang. classloader class
Example:
Inputstream in = classloader. getsystemresourceasstream (name );
Properties P = new properties ();
P. Load (in );

Supplement

You can use the getresourceasstream () method of javax. servlet. servletcontext in servlet.
Example:
Inputstream in = context. getresourceasstream (PATH );
Properties P = new properties ();
P. Load (in );

3. Internationalization: While internationalizing the interface, remember to internationalize plug-in. The International dialect method is % different from the message. getstring () method in the program.
<View
Class = "com. niis. myprice. Views. kindview"
Id = "com. niis. myprice. Views. kindview"
Name = "% plugin. kindmanager"/>
Then create a plugin. properties file for each language. Remember not to add these configuration files when releasing the file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.