Changes for page Java Client-WebStart Incremental Build
Last modified by David Avendasora on 2009/02/05 17:10
From version 22.1
edited by David Avendasora
on 2009/02/05 17:09
on 2009/02/05 17:09
Change comment:
There is no comment for this version
To version 30.1
edited by David Avendasora
on 2008/01/14 10:49
on 2008/01/14 10:49
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Java Client- WebStartIncremental Build1 +Java Client-Incremental Build - Content
-
... ... @@ -1,75 +1,19 @@ 1 - Therere manywaysyou canoyWebObjects JavaClient applications.Oneoftheways to doitisthroughWebStart.You couldmanuallycreatea WebStartapp,but WebObjectscan alsodoitforyou,taking careofJNLPcreation,jar organization,and manyWebStartnastybits.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. 2 2 3 - Thereis aproblemhowever.The WOLips incremental builderwill not automaticallycreatethe requiredjarofyourclient-sideclasses and place itin theproject.woa/Contents/WebServerResources/Java/directory as is requiredby a WebObjects WebStartJava Client application.3 +Below is a work-around until the incremental builder can be modified to create the needed directory and jar file. 4 4 5 -Without the client classes placed in WebServerResources, Eclipse's built-in Run... command will not work properly as the client application will not have access to its classes and WebObjects will silently fall-back to EOGenericRecord. This causes the confusing condition of the application launching and likely not generating any errors, but not working correctly either. 5 +1. Add a "Java" directory to the "WebServerResources" directory in your Eclipse project. 6 +1. Right-click on the new directory and select: "WOLips Tools -> Include as WebServerResource" 7 +1. Add the following code to the "javaclient" target (See the [[Ant Build>>Java Client-Build]] instructions) below the mkdir line. 6 6 7 - Below are the steps for adding an additional "Ant Builder" to your project togenerate andplacethe required jar in the right location.9 +{{code}} 8 8 9 -1. Create a "javaclientbuild.xml" file in the root of your project, with the following as its contents: 11 +<jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class" 12 + jarfile="WebServerResources/Java/${project.name}.jar"> 13 +</jar> 10 10 11 -{{code value="xml"}} 12 - 13 -<project name="javaclient" default="javaclient" basedir="."> 14 - <target name="setProps"> 15 - <property file="${user.home}${file.separator}build.properties" /> 16 - <property file="build.properties" /> 17 - <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties" /> 18 - <condition property="wo.properties.check.failed"> 19 - <not> 20 - <and> 21 - <isset property="wo.wosystemroot" /> 22 - <isset property="wo.wolocalroot" /> 23 - </and> 24 - </not> 25 - </condition> 26 - <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed" /> 27 - </target> 28 - <target name="javaclient" depends="setProps"> 29 - <mkdir dir="build/${project.name}.woa/Contents/WebServerResources/Java" /> 30 - <!-- project client-side classes --> 31 - <jar basedir="${classes.dir}" includes="**/client/**/*.class,**/common/**/*.class" jarfile="build/${project.name}.woa/Contents/WebServerResources/Java/${project.name}.jar"> 32 - </jar> 33 - 34 - <mkdir dir="build/${project.name}.woa/Contents/MacOS" /> 35 - <!-- Launch Scripts and WOBootstrap.jar --> 36 - <mkdir dir="build/${project.name}.woa/Contents/UNIX" /> 37 - <mkdir dir="build/${project.name}.woa/Contents/Windows" /> 38 - 39 - <copy file="/Library/Application Support/Apple/Developer Tools/WebObjects Support/UnixLaunch.sh" tofile="build/${project.name}.woa/Contents/${project.name}" /> 40 - <chmod file="build/${project.name}.woa/Contents/${project.name}" perm="ugo+rx" /> 41 - <copy file="/Library/Application Support/Apple/Developer Tools/WebObjects Support/WinLaunch.CMD" tofile="build/${project.name}.woa/Contents/${project.name}.CMD" /> 42 - <copy file="/Library/Application Support/Apple/Developer Tools/WebObjects Support/WinLaunch.CMD" tofile="build/${project.name}.woa/Contents/Windows/${project.name}.CMD" /> 43 - <copy file="/Library/Application Support/Apple/Developer Tools/WebObjects Support/WOBootstrap.jar" tofile="build/${project.name}.woa/Contents/WOBootstrap.jar" /> 44 - 45 - <copy file="/Library/Application Support/Apple/Developer Tools/WebObjects Support/UnixLaunchClient.sh" tofile="build/${project.name}.woa/Contents/MacOS/${project.name}_Client" /> 46 - <chmod file="build/${project.name}.woa/Contents/MacOS/${project.name}_Client" perm="ugo+rx" /> 47 - <copy file="ClasspathClient.txt" tofile="build/${project.name}.woa/Contents/MacOS/ClasspathClient.txt" /> 48 - 49 - <!-- D2JC only --> 50 - <copy file="user.d2wmodel" tofile="build/${project.name}.woa/Contents/Resources/user.d2wmodel" /> 51 - 52 - </target> 53 -</project> 54 54 {{/code}} 55 55 56 -1. Right-Click on your project, and select Properties. 57 -1. Click on "Builders" on the left side. 58 -[[image:Picture 2.png]] 59 -1. Click the "New" button. 60 -1. Select "Ant Build" and click "Okay". 61 -1. Name it "Java Client Incremental Builder" 62 -1. Under the "Main" tab, click "Browse Workspace". 63 -1. Click on your Project, and select the javaclientbuild.xml file you created in step 1, click "Okay". 64 -[[image:Picture 3.png]] 65 -1. Under the "Refresh" tab, check "Refresh resources upon completion." and select "The project containing the selected resource" 66 -[[image:Picture 4.png]] 67 -1. Under the "Targets" tab, set "javaclient" for "After a 'Clean'", "Manual Build" and "Auto Build". 68 -[[image:Picture 5.png]] 69 -It will show up as "<Default Target Selected>" 70 -[[image:Picture 7.png]] 71 -1. Click okay to close the Builder Properties window. 72 -1. Make sure your new Builder is checked and executes AFTER the WOLips Incremental Builder, otherwise it will error. 73 -1. Click "Okay" to exit Project Properties. 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. 74 74 75 - Done.You cannowusetheEclipse"Run..."commandjust asyouwouldfor any otherWOLipsproject.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.