Last modified by David Avendasora on 2008/07/01 16:52

From version 15.1
edited by David Avendasora
on 2008/06/25 10:14
Change comment: There is no comment for this version
To version 6.1
edited by David Avendasora
on 2008/06/25 09:21
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,8 +1,4 @@
1 -This tutorial will help you get a new Java Client or Direct To Java Client Application setup in Eclipse/WOLips and get it building properly.
2 -
3 -1. Create a new WebObjects Application
4 -[[image:Picture 9.png]]
5 -1. Name it "WebStartJNLPTest" in Eclipse with a package of "your.app" {{note title="Note!"}}If you change the Project name or packages, then you'll need to make additional changes in the subsequent steps.{{/note}}
1 +1. Create a new WOApplication named "WebStartJNLPTest" in Eclipse with a package of "your.app"
6 6  1. Modify the Main.html by adding:
7 7  
8 8  {{code title="Main.html Changes"}}
... ... @@ -27,23 +27,21 @@
27 27  
28 28  {{/code}}
29 29  
30 -1. Create a WOComponent named "JavaClient".
31 -[[image:Picture 11.png]][[image:Picture 10.png]]
32 -This WOComponent will be what passes the specifics about your client-side application to WebObjects.
26 +1. Create a WOComponent named JavaClient
33 33  1. Modify the JavaClient.html replacing the contents with:
34 34  
35 -{{code title="JavaClient.html Contents"}}
29 +{{code title="JavaClient.html"}}
36 36  <WEBOBJECT NAME=JavaClientComponent></WEBOBJECT>
37 37  {{/code}}
38 38  
39 -1. Paste the following as the contents of the JavaClient.wod file. Feel free to change the applicationName, applicationDescription and vendor parameters to anything you wish.
33 +1. Modify the JavaClient.wod file by adding:
40 40  
41 41  {{code title="JavaClient.wod Contents"}}
42 42  
43 43  JavaClientComponent: WOJavaClientComponent {
44 44   applicationClassName = "com.webobjects.eogeneration.EODynamicApplication";
45 - applicationName = "D2JC WebStart Test";
46 - applicationDescription = "D2JC WebStart Test";
39 + applicationName = "WebStartJBNDTest";
40 + applicationDescription = "WebStartJBNDTest";
47 47   downloadClientClasses = "noDownloadClientClasses";
48 48   vendor = "My Company";
49 49  }
... ... @@ -50,9 +50,6 @@
50 50  
51 51  {{/code}}
52 52  
53 -{{note title="Note!"}}If you are not creating a Direct To Java Client (D2JC) application, then you will need to replace the applicationClassName parameter (com.webobjects.eogeneration.EODynamicApplication) with the name of your client-side application class. Your non-D2JC client-side Application class *must* subclass EOApplication.{{/note}}
54 -
55 -1. If you didn't add an EOModel file to the project when you created it, do it now. Drop any existing EOModel in the Resources directory, or create one from scratch.
56 56  1. Add the following frameworks to the project build path:
57 57  JavaDirectToWeb
58 58  JavaDTWGeneration
... ... @@ -68,13 +68,8 @@
68 68  JavaJDBCAdaptor
69 69  JavaWebObjects
70 70  JavaWOExtensions
62 +1. Create a ClasspathClient.txt file in the root of the project and paste the following as contents:
71 71  
72 -{{note title="Note!"}}
73 - If you are not creating a D2JC application, then you won't need all of these, but they won't hurt anything either.
74 -{{/note}}
75 -
76 -1. Create a ClasspathClient.txt file in the root of the project and paste the following as contents:{{note title="Note!"}}If you changed the applicaton name in Step 2 above, make sure you change the name of the Client-Side .jar file in the first classpath line below (WebStartJNLPTest.jar). Also be sure to match the case of the project. Client-Side .jar filenames are CamelCase instead of all lowercase as server-side .jar filenames are.{{/note}}
77 -
78 78  {{code title="ClasspathClient.txt File"}}
79 79  
80 80  # ApplicationClass == com.webobjects.eoapplication.client.EOClientApplicationSupport
... ... @@ -103,8 +103,6 @@
103 103  
104 104  {{/code}}
105 105  
106 -This file is only required by the application when it is being launched from within Eclipse.
107 -
108 108  1. Create a javaclientbuild.xml file in root of the project and paste the follwing as contents:
109 109  
110 110  {{code title="javaclientbuild.xml"}}
... ... @@ -167,15 +167,8 @@
167 167  
168 168  {{/code}}
169 169  
170 -This file is needed to make up for the lack of Java Client application building by the WOLips Incremental Builder. It also copies the client launch scripts into the project so that the application will auto-launch when you run it from within Eclipse. Please follow the [[instructions>>Java Client-WebStart Incremental Build]] for how to create the Java Client Incremental Builder.
171 -
172 -1. If you did not setup the Java Client Incremental Builder, then right-click on the javaclientbuild.xml file and select "Run As -> Ant Build"
173 -[[image:Picture 12.png]]
154 +1. Right-click on the javaclientbuild.xml file and select "Run As -> Ant Build"
174 174  1. Right-click on the project and select "Run As -> WebObjects Application"
175 -[[image:Picture 13.png]]
176 176  1. Select your.app.Application as the Application class
177 -[[image:Picture 14.png]]
178 -1. If you want to actually deploy this application, then you will also need to [[modify the build.xml file>>Java Client-Building]].
179 -This is it. WebStart should automatically download your client application and launch it. If you are creating a D2JC application and did not put an EOModel file in the Resources directory of your project, then you'll see something like this:
180 -[[image:Picture 15.png]]
181 -If you don't want a D2JC application, then you are on your own for creating the user interface for it. Your client-side application can be a command-line or GUI application. If you want a Swing GUI, then I **highly** recommend Florijan Stamenkovic's [[JBND Framework>>http://web.mac.com/flor385/JBND/]]
157 +1. Copy the Direct Connect URL from the Eclipse console and paste it into your browser. You should get a "click here" link.
158 +1. Click it.