Last modified by David Avendasora on 2009/03/30 14:20

From version 18.1
edited by David Avendasora
on 2008/01/14 09:42
Change comment: There is no comment for this version
To version 22.1
edited by David Avendasora
on 2008/07/17 07:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Java Client-Building
1 +Java Client-WebStart Distribution Building
Content
... ... @@ -1,8 +1,8 @@
1 -You must include a jar of all the client-side classes for your application in the Project.woa/Contents/WebServerResources/Java/ directory of your deployed application.
1 +Your deployed WebStart-distributed application must have a jar of all the client-side classes (and any subclasses of EOGenericRecord that your client-classes extend) in the Project.woa/Contents/WebServerResources/Java/ directory. If you don't include a jar of your client-side classes in this directory, WebObjects silently uses EOGenericRecord instead. This is made obvious by things like default values, client-side validation and other client-side logic not working in the deployed application.
2 2  
3 -If you don't include you client-side classes in this directory, WebObjects silently uses EOGenericRecord instead. This is made obvious by things like default values and client-side validation missing in the deployed application.
3 +The following are the instructions when using Ant to build:
4 4  
5 -The following are the instructions for using Ant:
5 +1. Add the following "javaclient" target to your build.xml file.
6 6  
7 7  {{code}}
8 8  
... ... @@ -11,16 +11,37 @@
11 11   <jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class"
12 12   jarfile="${dest.dir}/${project.name}.woa/Contents/WebServerResources/Java/${project.name}.jar">
13 13   </jar>
14 +
15 + <!-- project user.d2wmodel file (D2JC only) -->
16 + <copy file="user.d2wmodel" tofile="${dest.dir}/${project.name}.woa/Contents/Resources/user.d2wmodel"/>
17 +
14 14  </target>
15 15  
16 16  {{/code}}
17 17  
18 -Then you need to make the build and install targets depend upon "javaclient" just prior to the "ssdd" target.
22 +1. Make the "build" and "install" targets depend upon "javaclient" just prior to the "ssdd" target.
19 19  
20 20  {{code}}
21 21  
22 22  <target name="build" depends="setProps,init.build,build.woapp,javaclient,ssdd,war" />
23 23  
28 +{{/code}}
29 +
30 +{{code}}
24 24  <target name="install" depends="setProps,init.install,build.woapp,javaclient,ssdd,war" />
32 +{{/code}}
25 25  
34 +1. If you are using any Frameworks that have client-side jars then you'll need to copy those jars over to the WebServerResources/Java directory as well. Because I don't want to go modifying any of the woproject files, I just copy the client-side jars of all my Local frameworks (Library/Frameworks/) into my app. Ideally it would only copy over the ones for the frameworks actually in the build path, but this works for now. I'll re-address it after the upcoming classpath changes to be rolled into WOLips.
35 +
36 +{{code}}
37 +
38 + <!-- the Java Client Client-Side Classes -->
39 + <copy todir="${dest.dir}/${project.name}/WEB-INF/${project.name}.woa/Contents/WebServerResources/Java">
40 + <fileset dir="${wo.wolocalroot}/Library/Frameworks">
41 + <include name="**/WebServerResources/Java/*.jar"/>
42 + </fileset>
43 + <mapper type="flatten"/>
44 + </copy>
45 +
46 +
26 26  {{/code}}