Changes for page WO 5.4 Getting Started

Last modified by D Tim Cummings on 2013/06/14 16:27

From version 53.1
edited by Pascal Robert
on 2007/11/29 13:19
Change comment: There is no comment for this version
To version 58.1
edited by Pascal Robert
on 2007/11/29 13:45
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,10 +1,10 @@
1 1  = Running the examples =
2 2  
3 -Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse.
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//.
4 4  
5 -The examples are in /Developer/Examples/JavaWebObjects
5 +The first step is: install Eclipse and WOLips :-)  
6 6  
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:
7 +Some examples needs Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do:
8 8  
9 9  {{code}}
10 10  
... ... @@ -13,24 +13,40 @@
13 13  
14 14  {{/code}}
15 15  
16 -Now, you can import the examples into Eclipse. Start Eclipse, select File > Import, and select General > Existing Projects into Workplace.
16 +Now, you can import the examples into Eclipse. Start Eclipse, select //File// > //Import//,
17 17  
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.
18 +[[image:ImportMenu.png]]
19 19  
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.
20 +and select //General// > //Existing Projects// into Workplace.
21 21  
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 :-)
22 +[[image:ImportGeneral.png]]
23 23  
24 -For each project, right-click on each project, select Build Path > Configure Build Path...
24 +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.
25 25  
26 -Click on the Projects tab, select the references to the WO frameworks and click Remove
26 +[[image:ImportProjectsList.png]]
27 27  
28 -Click on the Libraries tab, click the Add Library button
28 +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.
29 29  
30 -Select WebObjects Frameworks and click Next
30 +[[image:PackageExplorer.png]]
31 31  
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.
32 +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...//
33 33  
34 -After you corrected the build path, the project will rebuild itself and the errors shoud dissapear
34 +[[image:BuildPathMenu.png]]
35 35  
36 -You also have to fix the build path for JavaBusinessLogic and RelatedLinks because the Derby path is incorrect.
36 +Click on the //Projects// tab, select the references to the WO frameworks that have the Warning icon and click //Remove//.
37 +
38 +[[image:ConfigureBuildPath.png]]
39 +
40 +Click on the //Libraries// tab, click the //Add Library// button.  Select //WebObjects Frameworks// and click //Next//.
41 +
42 +[[image:AddLibrary.png]]
43 +
44 +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//.
45 +
46 +After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear.
47 +
48 +//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:
49 +
50 +[[image:GoodDerbyPath.png]]
51 +
52 +VoilĂ   You finally can run the examples.