The manifest-thing didn't seem to work :-(

/john

-----Original Message-----
From: Urs Reupke [mailto:[EMAIL PROTECTED] 
Sent: den 12 maj 2006 14:43
To: [email protected]
Subject: Re: Problems distributing Batik (Removed spam note)

Hey,

I didn't notice at once that you want to include the thirdparty .jars 
within your own .jar. Unfortunately, I don't know what to do in that 
case or if the manifest is required at all.

However, here's the answer to your question and what to do if you're 
content with having the jars externally:

Open the .jar you created in any program capable of handling .zip 
archives and look for a folder "META-INF" inside, which should contain a 
"MANIFEST.MF" file which you can process with a text editor.
(If it doesn't exist, this does not make your .jar invalid, to my 
knowledge the manifest is optional. This could be related to your 
problem, though)

Within, you will find something like:

===QUOTE===
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
Built-By: Urs Reupke
Main-Class: net.sf.anathema.Anathema
Class-Path: ./lib/batik-awt-util.jar ./lib/batik-bridge.jar
  ./lib/batik-css.jar ./lib/batik-dom.jar ./lib/batik-ext.jar ./lib/bat
  ik-gvt.jar
==UNQUOTE==

The "Class-Path" entry specifies where the thirdparty .jars should be 
found - in this case, assuming that my application's .jar lies in the 
current working directory ".", they are expected in a subfolder "./lib"
Note that this folder "./lib" is not within the .jar of my application 
but in the filesystem itself.

For further reference, you might want to consult Sun's Tutorial Path on 
jarring with java.[1]

Regards
-Urs

[1] Lesson: Packaging Programs in JAR Files
http://java.sun.com/docs/books/tutorial/deployment/jar/

John Knoop wrote:
> Hi Urs
> 
> How do I do that? :P
> 
> /john
> 
> -----Original Message-----
> From: Urs Reupke [mailto:[EMAIL PROTECTED] 
> Sent: den 12 maj 2006 09:27
> To: [email protected]
> Subject: Re: Problems distributing Batik (Removed spam note)
> 
> Hi John,
> Have you checked your jar's manifest declaration?
> Maybe one of the batik files has changed it's name since the last 
> version you distributed?
> 
> Regards
> -Urs
> 
> John Knoop wrote:
>> Hi
>>
>> I already do. There are 20 jar files in that folder, and I include all of
>> them in my project. But somehow I don't think they are packaged along
with
>> my application when I build it into a jar file.
>>
>> Anyone?
>>
>> /john
>>
>> -----Original Message-----
>> From: Tonny Kohar [mailto:[EMAIL PROTECTED] 
>> Sent: den 12 maj 2006 04:08
>> To: [email protected]
>> Subject: [SPAM DNS] - Re: Problems distributing Batik - Sending mail
> server
>> found on sbl-xbl.spamhaus.org
>>
>> Hi,
>>
>> On Thu, 2006-05-11 at 14:22 +0200, John Knoop wrote:
>>> I want to use Batik to convert SVG files into PNG and PDF's. This
>>> works great when I run the project in Netbeans, but how do I build and
>>> distribute it? I've tried to add all the 20 jar files to the project
>>> jar file, but it doesn't help. I get errors like "Exception in thread
>>> 'main' java.lang.NoClassDefFoundError:
>>> org/apache/fop/svg/PDFTranscoder".
>> You need to include pdf-transcoder jar as well, it found on trunk/lib
>> directory
>>
>> Regards
>> Tonny Kohar
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to