Wiki source code of WO 5.4 Getting Started
Version 56.1 by Pascal Robert on 2007/11/29 13:44
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
53.1 | 1 | = Running the examples = |
2 | |||
![]() |
55.1 | 3 | Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse. The examples are in ///Developer/Examples/JavaWebObjects//. |
![]() |
23.1 | 4 | |
![]() |
55.1 | 5 | The first step is: install Eclipse and WOLips :-) |
![]() |
39.1 | 6 | |
![]() |
55.1 | 7 | Some examples needs 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 | |||
![]() |
55.1 | 16 | Now, you can import the examples into Eclipse. Start Eclipse, select //File// > //Import//, |
17 | [[image:ImportMenu.png]] | ||
18 | | ||
19 | and select //General// > //Existing Projects// into Workplace. | ||
![]() |
43.1 | 20 | |
![]() |
55.1 | 21 | [[image:ImportGeneral.png]] |
22 | | ||
23 | 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. [[image:ImportProjectsList.png]] | ||
![]() |
43.1 | 24 | |
![]() |
55.1 | 25 | After the importation is done, you should see the projects in the WO Package Explorer. If you see the projects in Package Explorer (without "WO" in the name), that means that you are using the Java perpective instead of the WOLips perpective. Switch the perpective to WOLips. [[image:PackageExplorer.png]] |
26 | | ||
27 | 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 :-)For each project, right-click on each project, select //Build Path// > //Configure Build Path...// [[image:BuildPathMenu.png]] | ||
28 | | ||
29 | Click on the //Projects// tab, select the references to the WO frameworks that have the Warning icon and click //Remove//. [[image:ConfigureBuildPath.png]] | ||
30 | Click on the //Libraries// tab, click the //Add Library// button. Select //WebObjects Frameworks// and click //Next//. [[image:AddLibrary.png]] | ||
31 | | ||
32 | Click //System//, open the triangle next to //System// and make sure that //JavaEOAccess//, //JavaEOControl//, //JavaFoundation//, //JavaWebObjects//, //JavaWOExtensions// and //JavaXML// are selected. For //SchoolToolsClient//, you also need to add //JavaWebServicesSupport// and //JavaWebServicesClient// to the build path. For the //SchoolToolsServer//, you need to add //JavaWebServicesSupport//. | ||
![]() |
43.1 | 33 | |
![]() |
55.1 | 34 | After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear. |
![]() |
43.1 | 35 | |
![]() |
55.1 | 36 | //JavaBusinessLogic// and //RelatedLinks// requires Apache Derby, but the path to Derby's JAR is wrong. Remove the JAR from the build path, click //Add External JARs...//, browse your disk up to ///Developer/Examples/JavaWebObjects/Databases/db-derby-10.2.2.0-bin/lib// and select //derby.jar//. The build path should look like this: |
37 | [[image:GoodDerbyPath.png]] | ||
38 | | ||
39 | VoilĂ You finally can run the examples. |