On May 24, 2006, at 9:52 AM, Hordur Thordarson wrote:
> Hi,
>
> I'm using Eclipse 3.2rc5 and WOLips 2.0.0.131 on OS X 10.4 and am
> having a frustrating classpath problem.
>
> I have an app that I have added some external jars to in the Java
> Build Path / Libraries panel in the project preferences. The app
> works fine when run from within Eclipse but when I deploy it, it
> can't find the classes in question.
>
That is expected. WOLips does not add these automatically. Or, at
least, I am not aware of how to do this.
> I'm no WO classpath guru but my assumption was that the jars I
> added need to show up in the MacOSClassPath.txt file within the
> built .woa. However they aren't showing up there, no matter what I
> do.
>
Yes, they need to be there or in a "special" directory like:
> I can't put these files in /Library/WebObjects/Extensions because
> two of them allready exist there (older versions of commons-
> discovery.jar and commons-logging.jar) so I just created a /Library/
> Java/MyExtras directory and added the files from there. The
> correct paths show up in the .classpath file in Eclipse:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" path=""/>
> <classpathentry kind="con"
> path="org.objectstyle.wolips.WO_CLASSPATH/JavaWebObjects/
> JavaFoundation/JavaXML/JavaWOExtensions/JavaEOAccess/JavaEOControl/
> JavaJDBCAdaptor"/>
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> <classpathentry kind="lib" path="/Library/Frameworks/
> FrontBasePlugIn.framework/Versions/A/Resources/Java/
> frontbaseplugin.jar"/>
> <classpathentry kind="lib" path="/Library/Frameworks/
> SoloWeb28.framework/Resources/Java/soloweb28.jar"/>
> <classpathentry kind="lib" path="/Library/Java/LausnExtras/commons-
> httpclient-2.0.jar"/>
> <classpathentry kind="lib" path="/Library/Java/LausnExtras/commons-
> logging-api.jar"/>
> <classpathentry kind="lib" path="/Library/Java/LausnExtras/commons-
> logging.jar"/>
> <classpathentry kind="output" path="bin"/>
> </classpath>
>
> And they also show up in ant.classpaths.wo.wolocalroot and
> ant.frameworks.wo.wolocalroot (the app uses a framework to which I
> also added the jars in question but to no avail).
>
> Can anyone tell me why these jars don't show up in the installed
> app ? My framework shows up correctly.
What I have done in the past is to edit the build.xml for the
woframework or woapplication target and add a section like this:
<lib dir=".">
<include name="mail.jar"/>
<include name="activation.jar"/>
<include name="JavaMailDocs.zip" />
<exclude name="**/*.framework/**"/>
</lib>
There might be a better way to do this in more modern versions of
WLips, but I have not looked for it.
Chuck
-- Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointroPractical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects
This archive was generated by hypermail 2.0.0 : Wed May 24 2006 - 14:33:55 EDT