Last modified by David Avendasora on 2009/01/22 11:26

From version 15.1
edited by David Avendasora
on 2009/01/22 07:38
Change comment: There is no comment for this version
To version 22.1
edited by David Avendasora
on 2009/01/22 11:26
Change comment: Migrated to Confluence 5.3

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +Java Client
Content
... ... @@ -1,3 +1,54 @@
1 -=== Launching your application from within Eclipse/WOLips ===
1 +=== Launching your WebStart-based client-side application from within Eclipse/WOLips ===
2 2  
3 -There are two key files that help with launching your Java Client application from within WOLips. First is the Client Launch Script. Apple includes this file with Web Objects, it just needs to be copied and renamed as part of the incremental build process.
3 +There are two key files that help with launching your WebStart-based Java Client application from within WOLips.
4 +
5 +1. The Client Launch Script. This script allows Eclipse to automatically lanuch the client-side application for you when you run the application from within Eclipse instead of you needing to launch it manually using the normal Java WebStart process. Without this scrip you will get the following informational message in the console. {{noformat}}
6 +Unable to locate client launch script in your application,
7 +using the Auto Open In Browser feature instead of the Auto Open Client Application feature.
8 +{{/noformat}} If this occurs, the application will revert to launching the regular way by opening a web browser and loading the Main component, which means that you will still be able to launch your client-side application by clicking on the link for it in your web browser (which launches the app using Java WebStart), it's just not as convenient as having the application launch immediately upon running.
9 + Apple includes this script with WebObjects (/Library/Application Support/Apple/Developer Tools/WebObjects Support/UnixLaunch.sh). There is also a Windows .CMD file that serves the same purpose on Windows. Its implementation should be similar but I have not tested it.
10 +1. The Client-Side Classpath File (ClasspathClient.txt). This file defines the classpath for the client-side application. This is different than the classpath information that the server-side portion of a Java Client application uses. It appears that this file is only used by the Launch Script and not used when launching the client-side application using WebStart. Right now this file is not automatically created by the build process so you have to manually maintain it. If this file is not present or if there are errors in it, you will likely not be able to launch your client-side application using the Launch Script. Here is a bare-bones file. You'll need to add any additional Frameworks you've added to the project build path.
11 +
12 +{{noformat}}
13 +
14 +# ApplicationClass == com.webobjects.eoapplication.client.EOClientApplicationSupport
15 +# JDB == jdb
16 +# JDBOptions ==
17 +# JVM == java
18 +# JVMOptions ==
19 +APPROOT/WebServerResources/Java/MyApp.jar
20 +LOCALROOT/Library/Frameworks/MyFramework.framework/WebServerResources/Java/MyFramework.jar
21 +/System/Library/Frameworks/JavaFoundation.framework/WebServerResources/Java/JavaFoundation.jar
22 +WOROOT/Library/Frameworks/JavaEOControl.framework/WebServerResources/Java/JavaEOControl.jar
23 +WOROOT/Library/Frameworks/JavaXML.framework/WebServerResources/Java/JavaXML.jar
24 +WOROOT/Library/Frameworks/JavaDirectToWeb.framework/WebServerResources/Java/JavaDirectToWeb.jar
25 +WOROOT/Library/Frameworks/JavaEOApplication.framework/WebServerResources/Java/JavaEOApplication.jar
26 +WOROOT/Library/Frameworks/JavaEODistribution.framework/WebServerResources/Java/JavaEODistribution.jar
27 +WOROOT/Library/Frameworks/JavaEOGeneration.framework/WebServerResources/Java/JavaEOGeneration.jar
28 +WOROOT/Library/Frameworks/JavaEOInterface.framework/WebServerResources/Java/JavaEOInterface.jar
29 +WOROOT/Library/Frameworks/JavaEOInterfaceSwing.framework/WebServerResources/Java/JavaEOInterfaceSwing.jar
30 +WOROOT/Library/Frameworks/JavaEORuleSystem.framework/WebServerResources/Java/JavaEORuleSystem.jar
31 +WOROOT/Library/Frameworks/JavaWOJSPServlet.framework/WebServerResources/Java/JavaWOJSPServlet_client.jar
32 +HOMEROOT/Library/Java
33 +LOCALROOT/Library/Java
34 +WOROOT/Library/Java
35 +/Network/Library/Java
36 +WOROOT/Library/Frameworks/JavaVM.framework/Classes/classes.jar
37 +WOROOT/Library/Frameworks/JavaVM.framework/Classes/ui.jar
38 +
39 +{{/noformat}}
40 +
41 +Both of these files need to be copied into your app's build directory as part of the incremental build process. This is already documented in the [[Java Client-WebStart Incremental Build>>doc:Java Client-WebStart Incremental Build]] page.
42 +
43 +If everything is setup correctly, when you run your project in Eclipse/WOLips you will see the following in the console:
44 +
45 +{{noformat}}
46 +
47 +[2009-01-22 08:06:50 EST] <main> Opening client application with script:
48 +/MyEclipseWorkspace/MyApp/build/MyApp.woa/Contents/MacOS/MyApp_Client http://10.10.10.2:60436/cgi-bin/WebObjects/MyApp.woa
49 +
50 +{{/noformat}}
51 +
52 +{{tip}}
53 +Copy-Pasting this line into Terminal.app will allow you to launch the client-side application, and any errors generated by the launch will show up in the terminal.
54 +{{/tip}}