Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello,
we use localized resources in our Windchill Java projects.
The localized texts are located in resource files (*.rbinfo) that need to be converted to Java classes.
There is a "ResourceBuild" command that can be run from Windchill shell
to accomplish the conversion.
We would like to make the resource conversion part of our application build process.
Is it possible to run the resource builder out of Windchill shell
(from my own ANT script at my workstation without Windchill installed)?
Thank you in advance
mp.
Well,
it seems that I found some solution of the problem myself... 🙂
There are actually two ways to define localized resources in Windchill:
(1) .rbinfo files
(2) Java resources files (see wt.util.resource.WTListResourceBundle)
The Java resources for Windchill look as follows:
package my.app;
import wt.util.resource.RBEntry;
import wt.util.resource.RBUUID;
import wt.util.resource.WTListResourceBundle;
@RBUUID("my.app.myappResource")
public final class myappResource extends WTListResourceBundle {
@RBEntry("Hello world!")
public static final String HELLO = "myapp.hello";
// add other entries here
}
It also seems that variant (2) is the preferred way (according to PTC).
Using Java resources has got some important advantages:
(a)
There is no need to post-process (build) them using ResourceBuild. Java resources get built by the Java compiler during the application build process.
(b)
Java resources are much easier to maintain than rbinfo files. The Java compiler or IDE can check whether the file is consistent.
Hope this helps
mp.