🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1454

Re: Javamail works under Jbuilder but not under command line

#1454
From: R.F. Pels
Date: Tue, 11 Dec 2001 22:39
29 lines
2175 bytes
Owen Green wrote:

>> The Activation Framework jar is imported as a package and is included in
>> an import statement in the program.  I can see it >is included when
>> JBuilder creates the classpath.

So you import the classes from mail.jar and smtp.jar etcetera so you can 
deploy it as one jar. The JavaMail documentation says you cannot do that, 
but actually you can. If you need for example smtp and pop3 in JavaMail to 
do your thing, you must include all the classes from the smtp.jar and 
pop3.jar, but you must also add the following property files from the 
JavaMail jar to your own jar otherwise it will not work:

        META-INF/javamail.charset.map
        META-INF/javamail.default.address.map
        META-INF/javamail.default.providers
        META-INF/mailcap

Actually what I did was to put imap.jar, smtp.jar, pop3.jar and mail.jar 
from JavaMail in one JBuilder library, Java Activation Framework in another 
JBuilder library and added them to the target jar telling it to include ALL 
classes. I also extracted the above files and placed them in a new META-INF 
directory directly below my source path and added all four of them 
manually. If you do this, it will work flawlessly.


--

Ruurd
Technical Details
Message-ID: <3c168b3f_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub1.nntpserver.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3c1628d1$1_2@dnews> <3c163164_2@dnews> <3c164c7f$1_1@dnews> <3c16556e$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,6ccd96b37f5aca63
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-12-11 14:43:41 PST
Message-ID: <3c168b3f_2@dnews>
From: "R.F. Pels" <ruurd@acklin.nl>
Subject: Re: Javamail works under Jbuilder but not under command line
Newsgroups: borland.public.jbuilder.java.api
Date: Tue, 11 Dec 2001 23:39:41 +0100
References: <3c1628d1$1_2@dnews> <3c163164_2@dnews> <3c164c7f$1_1@dnews> <3c16556e$1_1@dnews>
Lines: 29
Organization: Acklin B.V.
User-Agent: KNode/0.6.1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
NNTP-Posting-Host: 195.241.217.37
X-Trace: dnews 1008110400 195.241.217.37 (11 Dec 2001 14:40:00 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub1.nntpserver.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews