• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Jar files...dont know what is the problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,
I have an application (5 files) which is in the following package,
"apps.panoramer"
main source file ( with the main function in it)
"Panoram.java"
Now this application uses the JAI API and I wanted to include the JAI jars so that the enduser will not have to have the JAI package installed to run the program. so this is what I made my directory structure look like..

this is what the manifest.tmp looks like
"Main-Class: Panoram.java
Class-Path: apps/JAI_jars/jai_core.jar apps/JAI_jars/jai_codec.jar
"
this is the command that I used to jar the application
jar cvmf manifest.tmp stitcher.jar apps/panoramer/*.class apps/panoramer/images/* apps/pannoramer/JAI_jars/*.jar
and all the files were added succesfully.

but when I run the app (java -jar stitcher.jar), it says that it can find a JAI function, even thought i have included the jar(jai_core.jar) in the jar file(stitcher.jar) and specified it in the class path.
what gives?
can someone please help me out.
I have tried different variations but nothing seems to work?
any help would be appreciated.
thanks
Danny Crasto
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U can un-jar the jar file and see if all files are in their repective directories.
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Danny,
The jar command that you provided:

does not match the hierarchy you outlined in your posting. According to the jar command, your JAI jars are in folder apps/pannoramer/JAI_jars (is the double-n intentional?) and not in apps/JAI_jars as you indicated. Also watch your casing; you used lowercase in some places and uppercase in others.
Are these merely errors in your posting?
Also, you do not need to unpack a jar file to see if it was created correctly, you can use somthing along the lines of:

hth,
bear
[ June 13, 2002: Message edited by: Bear Bibeault ]
 
danny crasto
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the responses...
I checked the hierachy(sp?) and it looks all fine...
the cases and the spellings (double 'n') are typos...
i have no idea why this doesn't work...
any other ideas...
thanks
Danny
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unjar the JAI jar files. Then jar them back up with the rest of the application. That way you don't have JAR's inside JAR's. Then it will work.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic