Wiki source code of WO 5.4 Getting Started
Version 54.1 by Pascal Robert on 2007/11/29 13:19
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
53.1 | 1 | = Running the examples = |
2 | |||
![]() |
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. |
![]() |
23.1 | 4 | |
![]() |
51.1 | 5 | The examples are in /Developer/Examples/JavaWebObjects |
![]() |
39.1 | 6 | |
![]() |
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: |
![]() |
39.1 | 8 | |
![]() |
43.1 | 9 | {{code}} |
10 | |||
11 | cd /Developer/Examples/JavaWebObjects/ | ||
12 | sudo sh installDatabases.sh <yourusername> | ||
13 | |||
14 | {{/code}} | ||
15 | |||
![]() |
53.1 | 16 | Now, you can import the examples into Eclipse. Start Eclipse, select File > Import, and select General > Existing Projects into Workplace. |
![]() |
43.1 | 17 | |
![]() |
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. |
![]() |
43.1 | 19 | |
![]() |
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. |
![]() |
43.1 | 21 | |
![]() |
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 :-) |
![]() |
43.1 | 23 | |
![]() |
53.1 | 24 | For each project, right-click on each project, select Build Path > Configure Build Path... |
![]() |
43.1 | 25 | |
![]() |
51.1 | 26 | Click on the Projects tab, select the references to the WO frameworks and click Remove |
![]() |
43.1 | 27 | |
![]() |
51.1 | 28 | Click on the Libraries tab, click the Add Library button |
![]() |
43.1 | 29 | |
![]() |
51.1 | 30 | Select WebObjects Frameworks and click Next |
![]() |
43.1 | 31 | |
![]() |
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. |
![]() |
43.1 | 33 | |
![]() |
51.1 | 34 | After you corrected the build path, the project will rebuild itself and the errors shoud dissapear |
![]() |
43.1 | 35 | |
![]() |
51.1 | 36 | You also have to fix the build path for JavaBusinessLogic and RelatedLinks because the Derby path is incorrect. |