Re: how to get the classpath to be set by XCode for added libs

Chad Leigh <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
On Sep 4, 2006, at 9:04 PM, Lachlan Deck wrote:

> Hi there,
>
> On 03/09/2006, at 8:40 AM, Chad Leigh wrote:
>
>> I have not done any serious WO programming since 4.5, but I have  
>> been doing hosting of java based WO since. I am helping someone  
>> now and this person has an app that uses mysql. He has the mysql  
>> connector jar and we are trying to get XCode to reference that in  
>> the UNIXClassPath.txt file as HOMEROOT/Library/Java/ 
>> mysql_connector.jar
>
> The jar's called mysql-connector-java.jar isn't it?
>
>> From what this person said, he added it as a lib to XCode and  
>> rebuilt the app after moving the .jar to ~/Library/Java on his OS  
>> X dev machine.
>>
>> What do we need to do so that XCode automatically makes the above  
>> HOMEROOT entry in the UNIXClassPath.txt file.  If I make it by  
>> hand the machine works fine so I know that is OK -- we just want  
>> it to happen every time the app is rebuilt.
>
> Xcode doesn't provide options for specifying search paths (e.g., ~/ 
> Library/Java/file.jar:/Library/Java/file.jar:/System....). You  
> could create an additional script-phase for the build process that  
> can run last to rewrite the rule. Have a look at  
> woaFrameworkMerge.pl (From project wonder) that can do this  
> automatically. I've got a Run script phase that simply does  
> 'perl ../scripts/woaFrameworkMerger.pl "${WRAPPER_DIR}"'. It  
> bundles custom frameworks into the app/Frameworks and rewrites the  
> classpath appropriately.

Ok, we'll look into this

>
> Perhaps easier (in this instance), if desired: you could put the  
> jar in ${NEXTROOT}/Library/WebObjects/Extensions/ and not link it  
> into the app. It'll be found automatically by the WO runtime. Just  
> upgrade the jar when you upgrade mysql.

This is not really feasible as that is a RO file system shared  
amongst freebsd jails and I would like each user to be able to have  
their own area...

HOMEROOT/Library/Java is one of the defaults in the classpath file  
but unless you specify the jar in the classpath line it doesn't find  
it it seems :-(

Thanks
Chad


>
> with regards,
> --
>
> Lachlan Deck
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.