473,327 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

creating a jar with an external library

4
I have a program that reads and writes tiff files. I have JAI ImageIO installed on my computer and the program works fine. But when I create a jar and try to run it on another computer I can't read or write tiffs. I'm not sure what I have to do to get this to work on other computers.

Here's what I have tried:
I created a directory lib (containing clibwrapper_jiio.jar and jai_imageio.jar), in the directory with the .class files. Then I added
Class-Path: lib\clibwrapper_jiio.jar lib\jai_imageio.jar
to my Manifest.txt.
Then I used
jar cmf Manifest.txt myjar.jar *.class

But the jar does not work on other computers. Does anyone know what I am doing wrong. Thanks.
Jul 3 '07 #1
3 2163
praveen2gupta
201 100+
I have a program that reads and writes tiff files. I have JAI ImageIO installed on my computer and the program works fine. But when I create a jar and try to run it on another computer I can't read or write tiffs. I'm not sure what I have to do to get this to work on other computers.

Here's what I have tried:
I created a directory lib (containing clibwrapper_jiio.jar and jai_imageio.jar), in the directory with the .class files. Then I added
Class-Path: lib\clibwrapper_jiio.jar lib\jai_imageio.jar
to my Manifest.txt.
Then I used
jar cmf Manifest.txt myjar.jar *.class

But the jar does not work on other computers. Does anyone know what I am doing wrong. Thanks.
Hi
Try following command
jar cvf Manifest.txt myjar.jar *.class

I think it's version related problem . cvf will prepare jar file of standard output.
Jul 3 '07 #2
eagles
4
Thanks, but I still isn't working. Does JAI Imageio need to be installed separately on every computer that runs the .jar? If it does then I don't understand what the Class-Path line in the manifest is for. I can't seem to find any information on this. Any help would be appreciated. Thanks.
Jul 3 '07 #3
JosAH
11,448 Expert 8TB
Thanks, but I still isn't working. Does JAI Imageio need to be installed separately on every computer that runs the .jar? If it does then I don't understand what the Class-Path line in the manifest is for. I can't seem to find any information on this. Any help would be appreciated. Thanks.
From what I understood from your question: yes; if your jar A uses another jar
B then both jars A and B have to be present on the system on which your
application is supposed to run. Of course you can play tricks big times if your
classes load other classes using the URLClassLoader. Otherwise just install
both A and B jars on a local system and make a classpath point to them.

kind regards,

Jos
Jul 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: S. van Beek | last post by:
Dear reader, In case an application is ussing an external model library you have to address this external model library in your application. This addressing takes place in a module of the...
6
by: Olivier Lechenne | last post by:
I am converting some projects from VS 6.0 to VS .NET 2003 and I get a linker error error LNK2001: unresolved external symbol ___security_cookie or error LNK2001: unresolved external symbol...
5
by: Paul Brun | last post by:
Hi guys, I would like to find out if : 1) Is the above possible? I have tried to wrap a C library that our company produces in a .Net class library and am receiving the following error: ...
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
6
by: tekmicha | last post by:
Hallo, I am a newbie in C and I have a question regarding C libraries. I got an application in C and I am trying to add some new features on it for my work. The problem is this application...
5
by: Frederiek | last post by:
Hi, I'm using MS Visual C++ 2005 (MSVC8.0). I am experiencing some kind of linker dilemma. While building a program I am -in a way- forced to use following construct. // aaa_ssf.h - some...
5
by: Nayan | last post by:
Hi, If I make a call to function which is in external library, and it goes into wait sate.. disabling my app to proceed further, how can I break this state elegantly? So far, I had to kill my...
2
by: Maydogg6 | last post by:
I need a hand with some stubborn link errors. I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function...
2
by: lpcarignan | last post by:
Hi all, Right now, I'm debugging a C# library by starting an external application. To do this, I go in the project settings of the C# project, go in the Debug section and check the radio button...
2
by: Markus Dehmann | last post by:
What to do if an external library is header-files-only (but you have to use it), and you get lots of linker errors? You will necessarily get linker errors "multiple definition of ..." if you try...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.