BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Paul Furbacher solution to deploying dependencies in jar fil

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment
View previous topic :: View next topic  
Author Message
Richard
Guest





PostPosted: Thu Feb 26, 2004 9:14 pm    Post subject: Paul Furbacher solution to deploying dependencies in jar fil Reply with quote




Folks,

Paul Furbacher has discovered a possible solution for including dependencies i.e. JavaHelp in jar files. I have listed his solution below.

But I do have a question Paul.

I successfully completed steps 1-4 (below) but on step 5, after I rebuild my project and my application archive I expand "myapp.jar" but failed to see the "jh.jar". How can i copy over "jh.jar" to "myapp.jar"?

Paul Furbacher solutions:

Why does this happen in your case? If you look
at the application JAR you made by double-clicking
on its node in the Project Pane, you'll see that
the jh.jar has been unpacked and all its files
have been packed into your JAR. Bad news. You cannot unpack the jh.jar and then include those classes in your application JAR.
This causes a security exception, which then causes
the program to abort.

Running it from *within* JBuilder catches an
exception which you probably weren't seeing:
a "SecurityException". From the command line,
you probably only saw the "Could not find main
class. Program will exit." message which I also
see in a separate window which opens *behind*
JBuilder (not very useful!).


Good news: you can add the jh.jar as a JAR
into your application archive by employing
a few straightforward remedies in JBuilder.

1. Exclude the JavaHelp library in the "Dependencies"
page of the Application archive's properties. Select
"Never include ...."

2. Add a Directory View to the project in the Project
Pane. The target directory is the JavaHelp/lib folder.
Set the filtering to "Use: Wildcards" with file pattern
set to "jh.*" (without the double-quotes which I use
here to delineate the pattern). OK.

3. Right-click on the "jh.jar" node in that directory
view. Select "Properties...", and just under "Build"
select "Copy". Don't select the "Copy" to the right
of the list down below.

4. Clean the project, and if necessary clean your
application archive node. Rebuild the project,
and if necessary, rebuild your archive node.

5. Expand the JAR node inside the archive node.
You should see

myapp.jar
/META-INF
/your_top_leve_package
- jh.jar

Run this. It should succeed.

Back to top
Paul Furbacher [TeamB]
Guest





PostPosted: Thu Feb 26, 2004 10:56 pm    Post subject: Re: Paul Furbacher solution to deploying dependencies in jar Reply with quote



Richard wrote:

Quote:
Paul Furbacher has discovered a possible solution [...]

Well, I thought I had. See my response to Gillmer's
message to the contrary. He's right. I propose
a solution in my follow up, but it may not be
the one you want. You may have no choice because
of the way the jh.jar is described in the
manifest.mf file.


--


Paul Furbacher (TeamB)

Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.