To edit or add content to this Wiki, you can simply create a new account at http://wocommunity.org/account.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A. use the following methods in your Application class:

Code Block
 /**
  * Calls _isAdditionalForeignSupportedDevelopmentPlatform
  *
  * @see com.webobjects.appserver.WOApplication#_isForeignSupportedDevelopmentPlatform()
 */
 public boolean _isForeignSupportedDevelopmentPlatform()
 {
   return (super._isForeignSupportedDevelopmentPlatform() || _isAdditionalForeignSupportedDevelopmentPlatform());
 }

 /**
  * Check for Windows XP
  * @return true if runs on XP
  */
 public boolean _isAdditionalForeignSupportedDevelopmentPlatform()
 {
   String s = System.getProperty("os.name");
   return ( s != null && s.equals("Windows XP") );
 }


- StefanKlein

Don't Use White Spaces for Path

Q. Can someone explain why NSBundle seems have broken path on Windows, but work fine in other platforms? 

   Example of an exception:

Panel

java.lang.IllegalArgumentException: Attempt to insert null into an
com.webobjects.foundation.NSMutableArray.
at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239)
at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700)
at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306)
at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333)

A. When using white spaces in the project, framework path or WAR deployment etc on Windows, the white space will turn into "%20" in the path.  This will cause NSBundle.mainBundle returns null when it unable to load any bundles.  For example:  

Code Block

Example path will not work:
C:\Documents and Settings
 
will turn into this wrong path:
C:\Documents%20and%20Settings
 
Therefore, this path will work:
C:\DocumentsAndSettings



Keep your files in path without white space seemed to be the first rule of thumb when development on Windows.  Default location "C:\Documents and Setting" should not be used.