Wiki source code of Web Applications-Development-Development on Windows
Version 8.1 by mychng on 2009/04/30 01:39
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | Here is a tutorial on installing WebObjects on Windows: | ||
2 | |||
3 | [[http://www.tetlabors.de/wo/setup_webobjects_on_windows.html]] | ||
4 | |||
5 | == Fixing Auto Launch == | ||
6 | |||
7 | //Q. Hi everyone. I've seen several people on the list with the same problem as this, but haven't seen it resolved yet. When launching an app on WO5.2.2 developer on Windows XP, this error message is displayed~:// | ||
8 | |||
9 | {{panel}} | ||
10 | |||
11 | Your application is not running on a supported development platform. AutoLaunch will not work. | ||
12 | |||
13 | {{/panel}} | ||
14 | |||
15 | I can cut and paste the URL into a browser manually, but I'm too lazy to do all that 'work' all day long :-) I've tried the WOAutoOpenInBrowser setting with no luck. I've also tried setting W2K compatibilty mode for project builder and the WOOpenUrl application with no luck. | ||
16 | |||
17 | A. use the following methods in your Application class: | ||
18 | |||
19 | {{code}} | ||
20 | |||
21 | /** | ||
22 | * Calls _isAdditionalForeignSupportedDevelopmentPlatform | ||
23 | * | ||
24 | * @see com.webobjects.appserver.WOApplication#_isForeignSupportedDevelopmentPlatform() | ||
25 | */ | ||
26 | public boolean _isForeignSupportedDevelopmentPlatform() | ||
27 | { | ||
28 | return (super._isForeignSupportedDevelopmentPlatform() || _isAdditionalForeignSupportedDevelopmentPlatform()); | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * Check for Windows XP | ||
33 | * @return true if runs on XP | ||
34 | */ | ||
35 | public boolean _isAdditionalForeignSupportedDevelopmentPlatform() | ||
36 | { | ||
37 | String s = System.getProperty("os.name"); | ||
38 | return ( s != null && s.equals("Windows XP") ); | ||
39 | } | ||
40 | |||
41 | {{/code}} | ||
42 | |||
43 | StefanKlein | ||
44 | |||
45 | == Don't Use White Spaces for Path == | ||
46 | |||
47 | //Q. Can someone explain why NSBundle seems have broken path on Windows, but work fine in other platforms? // | ||
48 | |||
49 | // Example of an exception~:// | ||
50 | |||
51 | {{panel}} | ||
52 | |||
53 | java.lang.IllegalArgumentException: Attempt to insert null into an | ||
54 | com.webobjects.foundation.NSMutableArray. | ||
55 | at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239) | ||
56 | at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700) | ||
57 | at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306) | ||
58 | at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333) | ||
59 | |||
60 | {{/panel}} | ||
61 | |||
62 | 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: | ||
63 | |||
64 | {{code}} | ||
65 | |||
66 | Example path will not work: | ||
67 | C:\Documents and Settings | ||
68 | |||
69 | will turn into this wrong path: | ||
70 | C:\Documents%20and%20Settings | ||
71 | |||
72 | Therefore, this path will work: | ||
73 | C:\DocumentsAndSettings | ||
74 | |||
75 | {{/code}} | ||
76 | |||
77 | |||
78 | \\\\ | ||
79 | |||
80 | Keep your files in path without white space seemed to be the first rule of thumb when development on Windows. Default location "C:ocuments and Setting" should not be used. |