Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Externalizable Strings  RSS feed

 
Jane Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use WSAD and i repeatedly get warnings or errors related to externalized strings....wat are externalized strings?? what is meant by marking a string as non externalizable?
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strings are non externalizable. Don't have any idea about the warning/error.
 
Jane Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya, so wat does being non-externalizable mean???
 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Anupam Sinha is referring to the java.io.Externalizable interface which is not implemented by the String class. The Externalizable interface does extend Serializable which is implemented by String. See the Javadoc for these two interfaces to understand the difference.

However, I believe your problem is specific to your IDE (WSAD). I use RAD 6.0 which is essentially WSAD. If you right-click on the Java code in an editor and select Source, you will see an Externalize Strings option which is, I believe, the reason for your warnings/errors. This is simply an option to move Strings to separate class / properties file. You can play with this option to see how it works.

You are probably seeing warnings like: "Non-externalized string literal". I don't think the warnings should cause you problems (unless, in fact, they are errors). WSAD is just trying to nudge you in the direction of separating String values from your code. Most likely, you can just turn these off. To do so, select Windows >> Preferences >> Java >> Compiler. Select the Advanced tab, then Ignore for the "Usage of non-externalized strings" option.

Note that these steps may be slightly different in your IDE.
[ July 09, 2007: Message edited by: Jay Damon ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jane Smith:
I use WSAD and i repeatedly get warnings or errors related to externalized strings...

It looks like Jay probably answered your question. In the future, please post the specific error messages, since this will help us help you.
[ July 09, 2007: Message edited by: marc weber ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!