Version 9.1 by Pascal Robert on 2012/07/21 14:35

Show last authors
1 {{info}}
2 Work in progress!
3 {{/info}}
4
5 This page is designed to be a ground floor installation procedure for installing Project Wonder, including: Eclipse, WebObjects and the WOlips plugin. This guide assumes Windows 7 (procedure should be the same for Windows XP and Vista).
6
7 There are four sections to this installation process.
8
9 == Step 1: Install a JDK 1.6 ==
10
11 Before installing anything else, you need to install a JDK. We suggest that you install the official [[JDK 1.6 from Oracle>>url:http://www.oracle.com/technetwork/java/javase/downloads/index.html||shape="rect"]]. Don't install a JRE, the tools really need the JDK.
12
13 == **Step 2: Install the latest version of Eclipse** ==
14
15 {{note}}
16 If you already have Eclipse installed, you may skip this step.
17 {{/note}}
18
19 Head over to the Eclipse Foundation and [[download>>url:http://eclipse.org/downloads/||shape="rect"]] the latest version of Eclipse 3.7 suitable for your Windows version. We suggest the "Classic" bundle of Eclipse.
20
21 Eclipse does not install as a package, rather it is simply a compressed archive. Installation is as simple as extracting the Eclipse folder, entering it and running the Eclipse executable. In this context, it is important to remember where the folder resides on your system for future use.
22
23 {{note}}
24 Install Eclipse in a path with no spaces in it! Eclipse is sensitive to that and can be problematic. Same thing for the workspace, put the Eclipse workspace in a path without any spaces in it.
25 {{/note}}
26
27 == **Step 3: Install WOlips plugin and the WebObjects Framework** ==
28
29 1. (((
30 ===== Install WOLips Plugin =====
31 )))
32
33 Currently you have a stock Eclipse installation which will allow you to do normal Java development, but it does not contain any of the WOLips plugins, so you will not have any of the WebObjects development tools. To begin your WOLips installation, from within Eclipse, select **Help** => **Install New Software...**
34 [[image:attach:InstallNewSoftware.png]]
35 This opens the "Install" panel where you can specify sites for Eclipse to download new software features. This dialog allows you to add/inspect any software features you have downloaded or were included in your default install of Eclipse. You can click "Available Software Sites" to see what was included by default.
36 [[image:attach:InstallPanel.png]]
37
38 1.
39 11. To install WOLips you will need to add the WOLips update site to Eclipse. You do this by clicking the "Add" button.  In the Name field you can enter a name for your update site. The name is arbitrary but since you could have multiple similar update sites you should give it a name that leaves no doubt about what it is.
40 [[image:attach:AddWOLipsSite.png]]
41 In the Location field, enter the following URL:
42 11*. **Current**: (For Elipse 3.7) [[http:~~/~~/jenkins.wocommunity.org/job/WOLips37Stable/lastSuccessfulBuild/artifact/temp/dist/>>url:http://jenkins.wocommunity.org/job/WOLips37Stable/lastSuccessfulBuild/artifact/temp/dist/||shape="rect"]]
43 11. You are returned to the "Install" panel, the WOLips site having been added to the list, and fully expanded to display all its offerings. Select features you want. If you're just getting started with WOLips you should select "WOLips" and "WOLips Goodies." Leave the other options until you are more familiar with Eclipse and WOLips and decide that you need them. (Here are some [[doc:WO.Other WOLips Install Options]].) After selecting the options you want, click "Next." You'll briefly see a progress bar while Eclipse "calculates requirements and dependencies."
44 [[image:attach:SelectFeatures.png]]
45 11. You'll see an "Install" panel, asking you to Review and Confirm selected items to be installed.
46 [[image:attach:InstallConfirm.png]]
47 11. Click **Next >**. The next dialog contains the license agreements for the selected features. After reviewing the agreements (you DO review your license agreements, right??  ), select "I accept the terms of the license agreement." Selecting this radio button will accept the license agreements for **all** of the features listed. Click **Finish** to continue. You may also get a warning about "unsigned content." Click "OK" to dismiss that dialog and continue the install.
48 [[image:attach:LicenseConfirm.png]]
49 11. Eclipse will now download and install all the selected features and plugins. When it has completed, it will prompt you to restart Eclipse. Select "Restart Now."
50 [[image:attach:restart.png]]
51
52 ===== 2. Install the WebObjects Framework =====
53
54 Once the WOlips plugin is installed, you will need to install the core frameworks with the help of WOInstaller.jar, available from the [[wocommunity.org site>>url:http://wocommunity.org/documents/tools/||shape="rect"]]. After, open a Command Prompt, and enter the following command:
55
56 {{code}}
57
58 java -jar \path\to\WOInstaller.jar 5.4.3 c:\Apple
59
60 {{/code}}
61
62 You might get an error about a missing folder in C:\Apple\Library, you can ignore this error.
63
64 == **Step 4: Link the Framework to WOlips through the properties configuration file** ==
65
66 {{note}}
67 Prerequisite: Eclipse with the WOlips plugin installed, and the WebObjects framework via step 2.
68 {{/note}}
69
70 This is the most intricate step in the installation process. The configuration file found in the WOlips preferences must correctly reference the framework directory structure. Failure to successfully complete this step will result in broken libraries.
71
72 Running the script from step 2 installs the WO framework to the /Developer/WebObjects543 directory on your system. Below is the contents for a configuration file that matches this setup. Create a new file called wolips.543.properties. Copy the code below (after modification) into that file.
73
74 {{note}}
75 You must replace <YOUR_USER_NAME_HERE!> with your the username which installed the framework.
76 {{/note}}
77
78 {{code}}
79
80 wo.system.root=/Developer/Versions/WebObjects543/System
81 wo.user.frameworks=/Users/<YOUR_USER_NAME_HERE!>/Library/Frameworks
82 wo.system.frameworks=/Developer/Versions/WebObjects543/System/Library/Frameworks
83 wo.bootstrapjar=/Developer/Versions/WebObjects543/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
84 wo.network.frameworks=/Network/Library/Frameworks
85 wo.api.root=/Developer/ADC%20Reference%20Library/documentation/WebObjects/Reference/API
86 wo.network.root=/Network
87 wo.extensions=/Developer/Versions/WebObjects543/Library/WebObjects/Extensions
88 wo.user.root=/Users/<YOUR_USER_NAME_HERE!>
89 wo.local.frameworks=/Developer/Versions/WebObjects543/Library/Frameworks
90 wo.dir.local.library.frameworks=/Developer/Versions/WebObjects543/Library/Frameworks
91 wo.apps.root=/Developer/Versions/WebObjects543/Library/WebObjects/Applications
92 wo.local.root=/Developer/Versions/WebObjects543
93 wo.dir.user.home.library.frameworks=/Users/<YOUR_USER_NAME_HERE!>/Library/Frameworks
94
95 {{/code}}
96
97 Place this file in ~~/Library/Application Support/WOLips, this directory should already exist and contain the default wolips.properties file.
98
99 The second part of this step is to link the WOlips plugin with the WO framework installed on your system. This is done through the tab found at Eclipse menu -> Preferences -> WOlips.
100
101 [[image:attach:Properties.png]]
102
103 {{note}}
104 It is important to realize that if you change the WOlips Properties File to "wolips.543.properties" and then hit "apply" it will write out the (now stale) field values to that file. This could potentially clobber your new wolips.543.properties file with the default values. If you suspect this has happened, close the WOlips preferences and inspect the wolips.543.properties file.
105 {{/note}}
106
107 Change the "WOlips Properties File" to wolips.543.properties and click OK.
108
109 At this point, you should have a functioning WebObjects platform to work with, visit <hello world link> to test your first WebObjects application.
110
111 (% style="text-decoration: underline;" %)**Video of Step 3:**
112
113 {{multimedia name="WOInstallPart3.mov"/}}
114
115 == Step 5: Import Project Wonder into your Eclipse workspace ==
116
117 Please follow this guide: [[Getting the Wonder Source Code>>url:http://wiki.objectstyle.org/confluence/display/WONDER/Getting+the+Wonder+Source+Code||shape="rect"]], which includes the page for [[importing the Project Wonder source>>url:http://wiki.objectstyle.org/confluence/display/WONDER/Working+with+Wonder+source+in+Eclipse||shape="rect"]] into your Eclipse workspace.
118
119 {{note}}
120 Project Wonder is a significant part of the WebObjects experience. Where the previous step seems to give new users the most grief now, this step will give you the most pleasure when working with WebObjects.
121 {{/note}}
122
123 (% style="text-decoration: underline;" %)**Video of Step 4:**
124
125 {{multimedia name="WOInstallPart4.mov"/}}
126
127 \\
128
129 At the end of this step, you will have Project Wonder imported into Eclipse under its own working set. If you are unfamiliar with working sets in Eclipse, the following video will help clarify. This video also demonstrates a "Hello World" project creation to validate proper installation.
130
131 {{multimedia name="WOInstall_WorkspaceAndHelloWorld.mov"/}}
132
133
134
135
136 == Fixing Auto Launch ==
137
138 //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~://
139
140 {{panel}}
141 Your application is not running on a supported development platform. AutoLaunch will not work.
142 {{/panel}}
143
144 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.
145
146 A. use the following methods in your Application class:
147
148 {{code}}
149
150 /**
151 * Calls _isAdditionalForeignSupportedDevelopmentPlatform
152 *
153 * @see com.webobjects.appserver.WOApplication#_isForeignSupportedDevelopmentPlatform()
154 */
155 public boolean _isForeignSupportedDevelopmentPlatform()
156 {
157 return (super._isForeignSupportedDevelopmentPlatform() || _isAdditionalForeignSupportedDevelopmentPlatform());
158 }
159
160 /**
161 * Check for Windows XP
162 * @return true if runs on XP
163 */
164 public boolean _isAdditionalForeignSupportedDevelopmentPlatform()
165 {
166 String s = System.getProperty("os.name");
167 return ( s != null && s.equals("Windows XP") );
168 }
169
170 {{/code}}
171
172 - StefanKlein
173
174 == Don't Use White Spaces for Path ==
175
176 //Q. Can someone explain why NSBundle seems have broken path on Windows, but work fine on other platforms? //
177
178 // Example of an exception~://
179
180 {{panel}}
181 java.lang.IllegalArgumentException: Attempt to insert null into an
182 com.webobjects.foundation.NSMutableArray.
183 at com.webobjects.foundation.NSMutableArray.addObject(NSMutableArray.java:239)
184 at com.webobjects.eoaccess.EOModelGroup.modelGroupForLoadedBundles(EOModelGroup.java:700)
185 at com.webobjects.eoaccess.EOModelGroup.globalModelGroup(EOModelGroup.java:306)
186 at com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:333)
187 {{/panel}}
188
189 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: 
190
191 {{code}}
192
193 Example path will not work:
194 C:\Documents and Settings
195  
196 will turn into this wrong path:
197 C:\Documents%20and%20Settings
198  
199 Therefore, this path will work:
200 C:\DocumentsAndSettings
201
202 {{/code}}
203
204 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.