Wiki source code of Java Client-Incremental Build

Version 33.1 by David Avendasora on 2008/01/14 10:50

Hide last authors
David Avendasora 28.1 1 WOLips incremental builder will not automatically create the required jar of your client-side classes and place it in the project.woa/Contents/WebServerResources/Java/ directory as is required by a Java Client application. Without the client classes placed here, the built-in Run... command will not work properly as the client application will not have access to it's classes and WebObjects will silently fail back to EOGenericRecord. This causes the confusing condition of the application launching and likely not generating any errors, but not working correctly.
David Avendasora 18.1 2
David Avendasora 28.1 3 Below is a work-around until the incremental builder can be modified to create the needed directory and jar file.
David Avendasora 18.1 4
David Avendasora 28.1 5 1. Add a "Java" directory to the "WebServerResources" directory in your Eclipse project.
David Avendasora 32.1 6 1. Right-click on the new directory and select: "WOLips Tools -> Include as WebServerResource". The directory should now have a little "W" on it's icon.
David Avendasora 30.1 7 1. Add the following code to the "javaclient" target (See the [[Ant Build>>Java Client-Build]] instructions) below the mkdir line.
David Avendasora 18.1 8
David Avendasora 28.1 9 {{code}}
David Avendasora 18.1 10
David Avendasora 30.1 11 <jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class"
12 jarfile="WebServerResources/Java/${project.name}.jar">
13 </jar>
David Avendasora 18.1 14
15 {{/code}}
16
David Avendasora 30.1 17 This code will cause the "WOLips Ant Tools -> Install" function to put the required jar file in the project's WebServerResources directory, which the incremental builder will then pick-up and place in the build directory.
18
19 You will need to "Install" your application each time prior to running it in Eclipse, but it is much better than Eclipse's Run functionality not being available to you at all.