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.