Wiki source code of WO 5.4 Getting Started

Version 54.1 by Pascal Robert on 2007/11/29 13:19

Hide last authors
Pascal Robert 53.1 1 = Running the examples =
2
Pascal Robert 51.1 3 Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse.
Gavin Eadie 23.1 4
Pascal Robert 51.1 5 The examples are in /Developer/Examples/JavaWebObjects
David Avendasora 39.1 6
Pascal Robert 51.1 7 Some examples needs Apache Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do:
David Avendasora 39.1 8
David Holt 43.1 9 {{code}}
10
11 cd /Developer/Examples/JavaWebObjects/
12 sudo sh installDatabases.sh <yourusername>
13
14 {{/code}}
15
Pascal Robert 53.1 16 Now, you can import the examples into Eclipse. Start Eclipse, select File > Import, and select General > Existing Projects into Workplace.
David Holt 43.1 17
Pascal Robert 51.1 18 On the next page, select Select root directory and browse your disk to /Developer/Examples/JavaWebObjects. You should see a list of projects to import. Deselect the second javaeoutil project, or else you won't be able to import the projects.
David Holt 43.1 19
Pascal Robert 51.1 20 You should see the projects in the WO Package Explorer. If you see the projects in Package Explorer (without the WO), that means that you are using the Java perpective instead of the WOLips perpective.
David Holt 43.1 21
Pascal Robert 51.1 22 Now, you need to fix the examples, because the build path is pointing to the source projects of the WO frameworks, source that nobody outside Apple has access to :-)
David Holt 43.1 23
Pascal Robert 53.1 24 For each project, right-click on each project, select Build Path > Configure Build Path...
David Holt 43.1 25
Pascal Robert 51.1 26 Click on the Projects tab, select the references to the WO frameworks and click Remove
David Holt 43.1 27
Pascal Robert 51.1 28 Click on the Libraries tab, click the Add Library button
David Holt 43.1 29
Pascal Robert 51.1 30 Select WebObjects Frameworks and click Next
David Holt 43.1 31
Pascal Robert 51.1 32 Click System, open the triangle next to System and make sure that JavaEOAccess, JavaEOControl, JavaFoundation, JavaWebObjects, JavaWOExtensions and JavaXML are selected. For the SchoolToolsClient, you also need to add the JavaWebServicesSupport and JavaWebServicesClient. For the SchoolToolsServer, you also need to add the JavaWebServicesSupport.
David Holt 43.1 33
Pascal Robert 51.1 34 After you corrected the build path, the project will rebuild itself and the errors shoud dissapear
David Holt 43.1 35
Pascal Robert 51.1 36 You also have to fix the build path for JavaBusinessLogic and RelatedLinks because the Derby path is incorrect.