Hello Spencer,

I know how frustrating this sort of error can be :)

You must have the JAI ImageIO jar on your system somewhere for your
app to work in NB... it could be installed locally or as a jar in your
maven repository. Depending on your platform, if you have it locally
installed I think you might need to include it in your classpath when
running your application jar.  Otherwise you can try to make sure that
the pure java version gets bundled into your app jar by specifying it
as a dependency in your pom.xml:

<dependency>
  <groupId>javax.media</groupId>
  <artifactId>jai_imageio</artifactId>
  <version>1.1</version>
</dependency>

Hope that helps. Others here with much more knowledge of JAI might
like to confirm or correct my suggestions.

Michael

On 18 September 2010 04:31, S Dille <[email protected]> wrote:
>
> Hi all,
>    I tried the maven shade plugin and it works.......almost.   I can get my
> geotools app to now open by clicking on the executable .jar file, I can
> perform drawing functions, open shapefiles, etc, but when I try to import
> any image files into it, I get:
>
> "Exception in Thread.....java.lang.NoClassDefFoundError: Could not
> initialize class javax.imageio.ImageIO at
> org.geotools.gce.image.WorldImageReader.<init><WorldImageReader.java:220) at
> org.geotools.gce.image.WorldImageFormat.getRead(WorldImageFormat.java:346
> ...
> ...
>
>
> My geotools application works fine when run from within Netbeans so
> apparantly a jar file is missing when I run it from the executable jar file
> outside of netbeans
>
> Any help would be hugely appreciated, I've been stuck on this for days
>
> Thank you!!!
>
> Spencer
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Building-runnable-jar-file-tp5508489p5543861.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to