Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » NLS problem
NLS problem [message #448345] Fri, 21 April 2006 11:43 Go to next message
Christian Gesswagner is currently offline Christian GesswagnerFriend
Messages: 34
Registered: July 2009
Member
Hi!

I have a class "Messages" with some static fields like:

public class Messages extends NLS
{
private static final String BUNDLE_NAME =
"my.package.internal.ui.actions.messages"; //$NON-NLS-1$

private Messages()
{
}

static
{
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
public static String OpenAction_0;
public static String OpenAction_1;
public static String OpenAction_2;
}


When I'm starting my application I get the error:

!ENTRY org.eclipse.osgi 2006-04-21 13:41:57.414
!MESSAGE Application error
!STACK 1
java.lang.NoSuchFieldError: OpenAction_1

BUT when I'm changing the class name "Messages" to "Message" or "Hugo"
everything works fine. Has anyone an idea, why the class name "Messages"
does not work (it is a generated class from Eclipse !!!!!!!!).

Thx, Christian
Re: NLS problem [message #448383 is a reply to message #448345] Mon, 24 April 2006 13:21 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Christian Gesswagner wrote:
> Hi!
>
> I have a class "Messages" with some static fields like:
>
> public class Messages extends NLS
> {
> private static final String BUNDLE_NAME =
> "my.package.internal.ui.actions.messages"; //$NON-NLS-1$
>
> private Messages()
> {
> }
>
> static
> {
> // initialize resource bundle
> NLS.initializeMessages(BUNDLE_NAME, Messages.class);
> }
> public static String OpenAction_0;
> public static String OpenAction_1;
> public static String OpenAction_2;
> }
>

What's in your messages.properties file?

Later,
PW


Re: NLS problem [message #448427 is a reply to message #448383] Mon, 24 April 2006 14:24 Go to previous message
Christian Gesswagner is currently offline Christian GesswagnerFriend
Messages: 34
Registered: July 2009
Member
it does not depend on the messages.properties file. See the thread "plug-in
loading classes question".


"Paul Webster" <pwebster@ca.ibm.com> schrieb im Newsbeitrag
news:e2ijci$56d$3@utils.eclipse.org...
> Christian Gesswagner wrote:
> > Hi!
> >
> > I have a class "Messages" with some static fields like:
> >
> > public class Messages extends NLS
> > {
> > private static final String BUNDLE_NAME =
> > "my.package.internal.ui.actions.messages"; //$NON-NLS-1$
> >
> > private Messages()
> > {
> > }
> >
> > static
> > {
> > // initialize resource bundle
> > NLS.initializeMessages(BUNDLE_NAME, Messages.class);
> > }
> > public static String OpenAction_0;
> > public static String OpenAction_1;
> > public static String OpenAction_2;
> > }
> >
>
> What's in your messages.properties file?
>
> Later,
> PW
Previous Topic:Best practice using RCP with separate server
Next Topic:Opening ServerSocket from plugin
Goto Forum:
  


Current Time: Tue Nov 05 06:49:53 GMT 2024

Powered by FUDForum. Page generated in 0.02569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top