Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Using JAR files in ProjectBuilder

Using JAR files in ProjectBuilder
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status: Offline
Reply With Quote
Nov 2, 2000, 03:22 PM
 
Hi,

I'm trying to use the javax.mail.* package in a Java-Cocoa app I'm writing, but I can't work out how to add the mail.jar file to the build-time classpath in project builder.

Can anyone help?

Thanks.
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
     
jhh
Guest
Status:
Reply With Quote
Nov 3, 2000, 11:45 AM
 
under Project->Add Files
navigate to select the jar file - click "open" (if its a directory of class files that's okay too)
Another panel shows up - can't remember what is says but no changes or weird options are required, just click "add"
It will be linked into your project (not actually copied or moved there) and some change will be detected/made when you build so that the jar file will be found.
good luck
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Nov 6, 2000, 09:03 PM
 
Here's something I picked up over at www.omnigroup.com
Seems to be just what you need.

Terry
---------------------------------------------------------------------
Below are the instructions I have and they worked for me.

Ron

> While Project Builder doesn't do this automatically, there is one workaround
> to get you there.
>
> 1) Add a reference to your project that points to the actual utility.jar file
> 2) Open the target and select to the last phase in the Build Phases listing
> 3) Create a new build phase with Project->New Build Phase->New Copy Files
> Build Phase
> 4) Add the utility.jar reference to this pahse and set it up to put the file
> in Resources with a subpath of "Java".
> 5) Open the MRJApp.properties file and append
> ":Contents/Resources/java/utility.jar" to the
> com.apple.mrj.application.classpath property.
>
> Now it should work (I just had to do this for my SimPhysics project). Note
> that you can do this for any number of additional jar files (SimPhysics had 5
> additional jar files to add beyond the normal "app" one) since the Copy Files
> build phase and com.apple.mrj.application.classpath will take multiple file
> references.
>
> Scott Tooker
> Mac OS X Dev Tools
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Nov 6, 2000, 09:17 PM
 
Here's something I picked up over at www.omnigroup.com
Seems to be just what you need.

Terry
---------------------------------------------------------------------
Below are the instructions I have and they worked for me.

Ron

> While Project Builder doesn't do this automatically, there is one workaround
> to get you there.
>
> 1) Add a reference to your project that points to the actual utility.jar file
> 2) Open the target and select to the last phase in the Build Phases listing
> 3) Create a new build phase with Project->New Build Phase->New Copy Files
> Build Phase
> 4) Add the utility.jar reference to this pahse and set it up to put the file
> in Resources with a subpath of "Java".
> 5) Open the MRJApp.properties file and append
> ":Contents/Resources/java/utility.jar" to the
> com.apple.mrj.application.classpath property.
>
> Now it should work (I just had to do this for my SimPhysics project). Note
> that you can do this for any number of additional jar files (SimPhysics had 5
> additional jar files to add beyond the normal "app" one) since the Copy Files
> build phase and com.apple.mrj.application.classpath will take multiple file
> references.
>
> Scott Tooker
> Mac OS X Dev Tools
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:39 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2